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]=`5b5fb6ad-48b0-4296-b124-6e2166518f6f`,e._sentryDebugIdIdentifier=`sentry-dbid-5b5fb6ad-48b0-4296-b124-6e2166518f6f`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,dn as r,eh as i,or as a,sh as o,wg as s}from"./entry.client-dr7r6s9a.js";import{n as c}from"./DialogShell-k2jpaw9r.js";import{t as l}from"./ConfirmationDialog-lzvdkfji.js";var u=n(),d=e(a(),1),f=t(),p=e=>{let t=(0,u.c)(9),{locGenericErrorSubheading:n,locOkay:r}=i();if(!(`type`in e))return e;switch(e.type){case`generic-error`:{let e;t[0]===n?e=t[1]:(e=n(),t[0]=n,t[1]=e);let i;t[2]===r?i=t[3]:(i=r(),t[2]=r,t[3]=i);let a;t[4]===i?a=t[5]:(a={text:i},t[4]=i,t[5]=a);let o;return t[6]!==e||t[7]!==a?(o={title:``,prompt:e,illustration:`error`,firstButton:a},t[6]=e,t[7]=a,t[8]=o):o=t[8],o}}},m=r(e=>{let t=(0,u.c)(23),n,r;t[0]===e?(n=t[1],r=t[2]):({goBack:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=c.useComponent(),a=p(n),o;t[3]!==a.firstButton||t[4]!==r?(o=e=>{a.firstButton?.onPress?.(e),r()},t[3]=a.firstButton,t[4]=r,t[5]=o):o=t[5];let s;t[6]!==a.firstButton||t[7]!==o?(s={...a.firstButton,onPress:o},t[6]=a.firstButton,t[7]=o,t[8]=s):s=t[8];let m;t[9]!==a.secondButton||t[10]!==r?(m=a.secondButton&&{...a.secondButton,onPress:e=>{a.secondButton?.onPress?.(e),r()}},t[9]=a.secondButton,t[10]=r,t[11]=m):m=t[11];let h;t[12]!==a||t[13]!==s||t[14]!==m?(h={...a,firstButton:s,secondButton:m},t[12]=a,t[13]=s,t[14]=m,t[15]=h):h=t[15];let g=h,_=a.title,v;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,d.default)(l.CONTAINER_CLASSNAME,`modal-medium modal-floating`),t[16]=v):v=t[16];let y;t[17]===g?y=t[18]:(y=(0,f.jsx)(l,{...g}),t[17]=g,t[18]=y);let b;return t[19]!==i||t[20]!==a.title||t[21]!==y?(b=(0,f.jsx)(i,{accessibleTitle:_,autoHeight:!0,className:v,children:y}),t[19]=i,t[20]=a.title,t[21]=y,t[22]=b):b=t[22],b},({...e})=>{let{dialog:t}=o(),{mutate:n}=s(t.mutations.goBack.getOptions());return{...e,goBack:n}}),h=e=>{let t=(0,u.c)(5),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r=m.useComponent(),i;return t[2]!==r||t[3]!==n?(i=(0,f.jsx)(r,{...n}),t[2]=r,t[3]=n,t[4]=i):i=t[4],i};export{m as ConfirmationDialogConnection,h as default};