try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d337084c-9ff6-4483-96ff-0f7bf4ff6cdc`,e._sentryDebugIdIdentifier=`sentry-dbid-d337084c-9ff6-4483-96ff-0f7bf4ff6cdc`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Ig as r,dn as i,en as a,fo as o,or as s,th as c,wg as l}from"./entry.client-dr7r6s9a.js";import{n as u,r as d,t as f}from"./ContextualStoreHost-j7xjb8fo.js";import{n as p}from"./DialogShell-k2jpaw9r.js";var m=e(s(),1),h=n(),g=e(r(),1),_=t(),v=i(e=>{let t=(0,h.c)(2),n;return t[0]===e?n=t[1]:(n=(0,_.jsx)(f,{...e}),t[0]=e,t[1]=n),n},e=>{let{systems:{dialog:t}}=c(),{mutate:n}=l(t.mutations.goBack.getOptions()),{onClose:r}=e;return{onClose:(0,g.useCallback)(()=>{r?r():n()},[n,r]),theme:a()===`light`?o.Light:o.Dark,...e}}),y=e=>{let t=(0,h.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({onWillClose:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=p.useComponent(),a=v.useComponent(),o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,m.default)(`w-full sm-25:w-[608px] xl-20:w-[689px]`,`h-full sm-25:h-[756px]`),t[3]=o):o=t[3];let s;t[4]!==a||t[5]!==n?(s=(0,_.jsx)(a,{...n}),t[4]=a,t[5]=n,t[6]=s):s=t[6];let c;return t[7]!==i||t[8]!==r||t[9]!==s?(c=(0,_.jsx)(i,{className:o,errorFallbackComponent:u,loadingFallbackComponent:d,onWillClose:r,children:s}),t[7]=i,t[8]=r,t[9]=s,t[10]=c):c=t[10],c};export{y as ContextualStoreDialog,y as default};