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]=`97625e79-38fc-4968-95f7-051dc6522c63`,e._sentryDebugIdIdentifier=`sentry-dbid-97625e79-38fc-4968-95f7-051dc6522c63`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Ig as r,dn as i,ep as a,sh as o,th as s,wg as c}from"./entry.client-dr7r6s9a.js";import{t as l}from"./useFlowId-n9vqrww9.js";import{t as u}from"./OffersAndCreditsHost-jfnu7rfh.js";import{n as d}from"./DialogShell-k2jpaw9r.js";var f=n(),p=e(r(),1),m=t(),h=i(e=>{let t=(0,f.c)(3),n=u.useComponent(),r;return t[0]!==n||t[1]!==e?(r=(0,m.jsx)(n,{...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},e=>{let{queryClient:t,systems:{dialog:n}}=s(),r=l(),{authentication:{queries:{xToken:i}}}=o(),{mutate:u}=c(n.mutations.goBack.getOptions()),d=(0,p.useCallback)(async e=>(await t.fetchQuery(i.getActiveUserQuery().getOptions({relyingParty:a.MDollar,uri:e}))).toAuthenticationHeader(),[t,i]),f=(0,p.useCallback)(e=>{},[]),m=(0,p.useCallback)(()=>{u()},[u]);return{...e,getAuthToken:d,onOfferRedeemed:f,onClose:m,flowId:r}}),g=()=>{let e=(0,f.c)(5),t=d.useComponent(),n=h.useComponent(),r;e[0]===n?r=e[1]:(r=(0,m.jsx)(n,{}),e[0]=n,e[1]=r);let i;return e[2]!==t||e[3]!==r?(i=(0,m.jsx)(t,{className:`h-full w-full`,children:r}),e[2]=t,e[3]=r,e[4]=i):i=e[4],i};export{g as OffersAndCreditsDialog,g as default};