import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";var H=e.from_html('<span class="caption svelte-xds4q5"> </span>'),I=e.from_html('<div class="image-container svelte-xds4q5"><img class="svelte-xds4q5"/> <!></div>'),J=e.from_html('<span class="caption svelte-xds4q5"> </span>'),K=e.from_html('<div class="image-container svelte-xds4q5"><video preload="metadata" class="svelte-xds4q5"></video> <!></div>',2),L=e.from_html('<div class="more-indicator svelte-xds4q5">…</div>'),M=e.from_html('<div class="images-wrapper svelte-xds4q5"><!> <!></div>'),N=e.from_html("<div><!></div>");function Q(y,o){e.push(o,!1);let a=e.prop(o,"value",12),p=e.prop(o,"type",12),f=e.prop(o,"selected",12,!1);var w={get value(){return a()},set value(r){a(r),e.flush()},get type(){return p()},set type(r){p(r),e.flush()},get selected(){return f()},set selected(r){f(r),e.flush()}};e.init();var _=N();let k;var E=e.child(_);{var j=r=>{var g=M(),q=e.child(g);e.each(q,1,()=>(e.deep_read_state(a()),e.untrack(()=>a().slice(0,3))),e.index,(n,t)=>{var b=e.comment(),B=e.first_child(b);{var C=d=>{var v=I(),i=e.child(v),u=e.sibling(i,2);{var c=l=>{var s=H(),h=e.child(s,!0);e.reset(s),e.template_effect(()=>e.set_text(h,(e.get(t),e.untrack(()=>e.get(t).caption)))),e.append(l,s)};e.if(u,l=>{e.get(t),e.untrack(()=>e.get(t).caption)&&l(c)})}e.reset(v),e.template_effect(()=>{e.set_attribute(i,"src",(e.get(t),e.untrack(()=>e.get(t).image.url))),e.set_attribute(i,"alt",(e.get(t),e.untrack(()=>e.get(t).caption||"")))}),e.append(d,v)},D=d=>{var v=e.comment(),i=e.first_child(v);{var u=c=>{var l=K(),s=e.child(l);s.controls=!1,s.muted=!0;var h=e.sibling(s,2);{var F=m=>{var x=J(),G=e.child(x,!0);e.reset(x),e.template_effect(()=>e.set_text(G,(e.get(t),e.untrack(()=>e.get(t).caption)))),e.append(m,x)};e.if(h,m=>{e.get(t),e.untrack(()=>e.get(t).caption)&&m(F)})}e.reset(l),e.template_effect(()=>e.set_attribute(s,"src",(e.get(t),e.untrack(()=>e.get(t).video.url)))),e.append(c,l)};e.if(i,c=>{e.get(t),e.untrack(()=>"video"in e.get(t)&&e.get(t).video)&&c(u)},!0)}e.append(d,v)};e.if(B,d=>{e.get(t),e.untrack(()=>"image"in e.get(t)&&e.get(t).image)?d(C):d(D,!1)})}e.append(n,b)});var z=e.sibling(q,2);{var A=n=>{var t=L();e.append(n,t)};e.if(z,n=>{e.deep_read_state(a()),e.untrack(()=>a().length>3)&&n(A)})}e.reset(g),e.append(r,g)};e.if(E,r=>{e.deep_read_state(a()),e.untrack(()=>a()&&a().length>0)&&r(j)})}return e.reset(_),e.template_effect(()=>k=e.set_class(_,1,"container svelte-xds4q5",null,k,{table:p()==="table",gallery:p()==="gallery",selected:f()})),e.append(y,_),e.pop(w)}export{Q as default};
