import{a as i,j as l,f as G,i as _,l as c,y as z,g as H,s as J,t as r,q as K,e as d,c as b,w as o,r as F,k as M,D as N}from"./index-BtH6urND.js";var O=l('<button type="button" class="zoom-button svelte-hreotd"><img class="svelte-hreotd"/></button>'),P=l('<img class="svelte-hreotd"/>'),Q=l('<div class="caption svelte-hreotd"> </div>'),R=l('<div class="lightbox svelte-hreotd" role="button" tabindex="0"><img class="svelte-hreotd"/></div>'),S=l("<div><!> <!></div> <!>",1);function U(W,a){let h=i(a,"src",3,""),n=i(a,"alt",3,""),m=i(a,"caption",3,void 0),g=i(a,"width",3,void 0),u=i(a,"maxWidth",3,void 0),w=i(a,"height",3,void 0),x=i(a,"objectFit",3,"contain"),k=i(a,"zoomable",3,!1),q=i(a,"border",3,!1),v=J(!1);var y=S(),f=G(y),j=c(f);{var D=e=>{var t=O();t.__click=()=>b(v,!0);var s=c(t);r(()=>{o(s,"src",h()),o(s,"alt",n()),F(s,`width: ${g()||"auto"}; max-width: ${u()||"100%"}; height: ${w()||"auto"}; object-fit: ${x()};`)}),d(e,t)},E=e=>{var t=P();r(()=>{o(t,"src",h()),o(t,"alt",n()),F(t,`width: ${g()||"auto"}; max-width: ${u()||"100%"}; height: ${w()||"auto"}; object-fit: ${x()};`)}),d(e,t)};_(j,e=>{k()?e(D):e(E,!1)})}var I=z(j,2);{var L=e=>{var t=Q(),s=c(t);r(()=>M(s,m())),d(e,t)};_(I,e=>{m()&&e(L)})}var A=z(f,2);{var B=e=>{var t=R();t.__click=()=>b(v,!1),t.__keydown=C=>C.key==="Escape"&&b(v,!1);var s=c(t);r(()=>{o(s,"src",h()),o(s,"alt",n())}),d(e,t)};_(A,e=>{k()&&H(v)&&e(B)})}r(()=>K(f,1,`image-wrapper ${q()?"bordered":""}`,"svelte-hreotd")),d(W,y)}N(["click","keydown"]);export{U as default};
