import{S as B,i as E,s as H,p as I,e as w,a as j,t as M,b as g,d as k,f as T,g as c,l as S,u as D,q as F,r as O,h as q,j as Q,k as R,n as U,A as z,F as G,Q as y,$ as J,a0 as K,a1 as A}from"./index.396f4a72.js";function N(l){let t,o,e,u,L,f,m=l[2]+1+"",v,p,_=l[3].length+"",d,b,i,r,x,n;const C=l[9].default,a=I(C,l,l[8],null);return{c(){t=w("div"),a&&a.c(),o=j(),e=w("div"),u=w("button"),u.innerHTML='',L=j(),f=w("div"),v=M(m),p=M(" / "),d=M(_),b=j(),i=w("button"),i.innerHTML='',g(u,"class","flex items-center justify-center h-6 w-6 hover:text-orange-500"),g(f,"class","carousel_index text-center font-semibold"),g(i,"class","flex items-center justify-center h-6 w-6 hover:text-orange-500"),g(e,"class","carousel-control flex gap-4 justify-center items-center pt-2 text-sm"),g(t,"class","output-carousel flex flex-col relative"),g(t,"id",l[0]),k(t,"!hidden",!l[1])},m(s,h){T(s,t,h),a&&a.m(t,null),c(t,o),c(t,e),c(e,u),c(e,L),c(e,f),c(f,v),c(f,p),c(f,d),c(e,b),c(e,i),r=!0,x||(n=[S(u,"click",l[7]),S(i,"click",l[6])],x=!0)},p(s,[h]){a&&a.p&&(!r||h&256)&&D(a,C,s,s[8],r?O(C,s[8],h,null):F(s[8]),null),(!r||h&4)&&m!==(m=s[2]+1+"")&&q(v,m),(!r||h&8)&&_!==(_=s[3].length+"")&&q(d,_),(!r||h&1)&&g(t,"id",s[0]),h&2&&k(t,"!hidden",!s[1])},i(s){r||(Q(a,s),r=!0)},o(s){R(a,s),r=!1},d(s){s&&U(t),a&&a.d(s),x=!1,z(n)}}}const P={};function V(l,t,o){let e,u,{$$slots:L={},$$scope:f}=t,{elem_id:m=""}=t,{visible:v=!0}=t;const p=G(),_=A([]);y(l,_,n=>o(3,e=n));const d=A();y(l,d,n=>o(11,u=n));let b=-1;J(P,{register:()=>(e.push(++b),_.set(e),b),unregister:n=>{const C=e.findIndex(a=>a===n);e.slice(C,1),_.set(e)},current:d});let i=0;const r=()=>{o(2,i=(i+1)%e.length),p("change")},x=()=>{o(2,i=(i-1+e.length)%e.length),p("change")};return l.$$set=n=>{"elem_id"in n&&o(0,m=n.elem_id),"visible"in n&&o(1,v=n.visible),"$$scope"in n&&o(8,f=n.$$scope)},l.$$.update=()=>{l.$$.dirty&12&&K(d,u=e[i]||0,u)},[m,v,i,e,_,d,r,x,f,L]}class X extends B{constructor(t){super(),E(this,t,V,N,H,{elem_id:0,visible:1})}}export{X as C,P as a}; //# sourceMappingURL=CarouselItem.svelte_svelte_type_style_lang.cc0aed40.js.map