import{S as L,i as N,s as T,o as p,q as v,u as y,v as w,w as j,k as B,j as A,b as m,h as b,e as g,a as u,F as d,f as k,l as z,m as D,n as E}from"./index.9fc31042.js";import{B as H}from"./Block.ddaaf792.js";import{B as I}from"./BlockLabel.16b10101.js";import{S as J}from"./StatusTracker.14e5b2a2.js";var F="./assets/image.45facf29.svg";function S(i,e,l){const t=i.slice();return t[8]=e[l],t[10]=l,t}function K(i){let e,l,t,s=i[5]!==null&&q(i),o=i[3],a=[];for(let n=0;n<o.length;n+=1)a[n]=C(S(i,o,n));return{c(){e=g("div"),s&&s.c(),l=B(),t=g("div");for(let n=0;n<a.length;n+=1)a[n].c();u(t,"class","flex flex-wrap gap-3 max-h-full overflow-auto"),u(e,"class","p-4 relative h-[16rem]")},m(n,_){m(n,e,_),s&&s.m(e,null),k(e,l),k(e,t);for(let c=0;c<a.length;c+=1)a[c].m(t,null)},p(n,_){if(n[5]!==null?s?s.p(n,_):(s=q(n),s.c(),s.m(e,l)):s&&(s.d(1),s=null),_&56){o=n[3];let c;for(c=0;c<o.length;c+=1){const r=S(n,o,c);a[c]?a[c].p(r,_):(a[c]=C(r),a[c].c(),a[c].m(t,null))}for(;c<a.length;c+=1)a[c].d(1);a.length=o.length}},d(n){n&&b(e),s&&s.d(),D(a,n)}}}function M(i){let e,l,t;return{c(){e=g("div"),l=g("img"),d(l.src,t=F)||u(l,"src",t),u(l,"alt",""),u(l,"class","h-6 opacity-20"),u(e,"class","min-h-[16rem] flex justify-center items-center")},m(s,o){m(s,e,o),k(e,l)},p:E,d(s){s&&b(e)}}}function q(i){let e,l,t,s,o;return{c(){e=g("div"),l=g("img"),u(l,"class","h-3/4 object-contain border-gray-300 border-8"),d(l.src,t=i[3][i[5]])||u(l,"src",t),u(l,"alt",""),u(e,"class","absolute w-full h-full z-10 bg-black bg-opacity-10 flex justify-center items-center")},m(a,n){m(a,e,n),k(e,l),s||(o=z(e,"click",i[6]),s=!0)},p(a,n){n&40&&!d(l.src,t=a[3][a[5]])&&u(l,"src",t)},d(a){a&&b(e),s=!1,o()}}}function C(i){let e,l,t,s;function o(){return i[7](i[10])}return{c(){e=g("img"),u(e,"class","h-32 object-contain border-gray-300 border-8 cursor-pointer"),d(e.src,l=i[8])||u(e,"src",l),u(e,"style",i[4]),u(e,"alt","")},m(a,n){m(a,e,n),t||(s=z(e,"click",o),t=!0)},p(a,n){i=a,n&8&&!d(e.src,l=i[8])&&u(e,"src",l),n&16&&u(e,"style",i[4])},d(a){a&&b(e),t=!1,s()}}}function O(i){let e,l,t,s,o,a;e=new J({props:{tracked_status:i[0]}}),t=new I({props:{show_label:i[1],image:F,label:i[2]||"Gallery"}});function n(r,f){return r[3]===null?M:K}let _=n(i),c=_(i);return{c(){p(e.$$.fragment),l=B(),p(t.$$.fragment),s=B(),c.c(),o=A()},m(r,f){v(e,r,f),m(r,l,f),v(t,r,f),m(r,s,f),c.m(r,f),m(r,o,f),a=!0},p(r,f){const G={};f&1&&(G.tracked_status=r[0]),e.$set(G);const h={};f&2&&(h.show_label=r[1]),f&4&&(h.label=r[2]||"Gallery"),t.$set(h),_===(_=n(r))&&c?c.p(r,f):(c.d(1),c=_(r),c&&(c.c(),c.m(o.parentNode,o)))},i(r){a||(y(e.$$.fragment,r),y(t.$$.fragment,r),a=!0)},o(r){w(e.$$.fragment,r),w(t.$$.fragment,r),a=!1},d(r){j(e,r),r&&b(l),j(t,r),r&&b(s),c.d(r),r&&b(o)}}}function P(i){let e,l;return e=new H({props:{variant:"solid",color:"grey",padding:!1,$$slots:{default:[O]},$$scope:{ctx:i}}}),{c(){p(e.$$.fragment)},m(t,s){v(e,t,s),l=!0},p(t,[s]){const o={};s&2111&&(o.$$scope={dirty:s,ctx:t}),e.$set(o)},i(t){l||(y(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){j(e,t)}}}function Q(i,e,l){let{loading_status:t}=e,{show_label:s}=e,{label:o}=e,{value:a=null}=e,{style:n=""}=e,_=null;const c=()=>{l(5,_=null)},r=f=>{l(5,_=f)};return i.$$set=f=>{"loading_status"in f&&l(0,t=f.loading_status),"show_label"in f&&l(1,s=f.show_label),"label"in f&&l(2,o=f.label),"value"in f&&l(3,a=f.value),"style"in f&&l(4,n=f.style)},[t,s,o,a,n,_,c,r]}class R extends L{constructor(e){super(),N(this,e,Q,P,T,{loading_status:0,show_label:1,label:2,value:3,style:4})}}var Y=R;const Z=["static"];export{Y as Component,Z as modes};
