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]=`dc213fb2-a562-49ca-ab46-7715920430a8`,e._sentryDebugIdIdentifier=`sentry-dbid-dc213fb2-a562-49ca-ab46-7715920430a8`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Um as n,Yh as r,_r as i,ir as a,jg as o,ju as s,ng as c,pi as l}from"./entry.client-mpghtlrl.js";import{n as u,r as d,t as f}from"./ContextualStoreHost-jce1zzlr.js";import{n as p}from"./DialogShell-ga7ic6wy.js";var m=e(l(),1),h=t(),g=e(o(),1),_=c(),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}}=n(),{mutate:i}=r(t.mutations.goBack.getOptions()),{onClose:o}=e;return{onClose:(0,g.useCallback)(()=>{o?o():i()},[i,o]),theme:a()===`light`?s.Light:s.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};