1import{d as b,t as u,q as C,O as M,R as y,f as w,g as d,e as h,r as I,i as D,D as p,b as v,B as x,o as g,X as B,x as R,N as L,c as S,w as H,ak as T}from"./vendor.DFAb0jsy.js";import{d as $,l as P,a as N,R as _}from"./app.OtV8efoB.js";const V=["aria-label"],q={class:"fullscreen-modal__content"},E={class:"fullscreen-modal__footer"},K=b({__name:"FullscreenModal",props:{closeLabel:{default:"Close"}},emits:["modalClosed","modalMounted"],setup(n,{expose:m,emit:f}){m({open:e});const l=f,{disableScrollLock:c,enableScrollLock:t}=$(),o=u(),a=u(!1),r=u();function s(){a.value=!1,c(),l("modalClosed")}async function e(){a.value=!0,await C(),r.value?.focus(),t(o.value),l("modalMounted")}return(i,O)=>{const k=I("icon");return M((g(),w("div",{id:"fullscreen-modal",ref_key:"container",ref:o,class:"fullscreen-modal","aria-label":"Dialog",role:"dialog"},[d("button",{ref_key:"refCloseButton",ref:r,"aria-label":n.closeLabel,class:"top-close btn btn--link",onClick:p(s,["prevent","stop"]),onKeydown:D(s,["esc"])},[h(k,{name:"x"})],40,V),d("div",q,[v(i.$slots,"content")]),d("div",E,[d("button",{type:"button",class:"btn btn--primary",onClick:p(s,["prevent","stop"])},x(n.closeLabel),1)])],512)),[[y,a.value]])}}}),F=b({__name:"ProductDetailPageImageModal",props:{closeLabel:{default:"Back to product page"}},setup(n){const m=L(),{closeDialogs:f,changeRouteHashTo:l}=P(),c=N(),t=u(),o=B(1);c.on("openImageModal",e=>{o.value=e.focusToImageIdx+1,a()});function a(){f(),l(_.PdpDetailedImages),t.value?.open()}function r(){l(),o.value=1,c.emit("imageModalClosed")}function s(){const e=(t.value?.$el).querySelectorAll(`img:nth-child(${o.value})`),[i]=[...e];i?.scrollIntoView({block:"center"})}return R(()=>{m.hash===_.PdpDetailedImages&&a()}),(e,i)=>(g(),S(T,{to:"body"},[h(K,{ref_key:"childRef",ref:t,"close-label":n.closeLabel,onModalClosed:r,onModalMounted:s},{content:H(()=>[v(e.$slots,"default")]),_:3},8,["close-label"])]))}});export{F as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.