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]=`ce0d31e7-3836-4220-968c-03c56f9cf058`,e._sentryDebugIdIdentifier=`sentry-dbid-ce0d31e7-3836-4220-968c-03c56f9cf058`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Ig as n,U as r,Ul as i,dn as a,hn as o,mr as s,or as c,zp as l}from"./entry.client-dr7r6s9a.js";import{t as u}from"./useTimeout-cqe06frz.js";import{t as d}from"./DialogShell-k2jpaw9r.js";import{t as f}from"./useEmitGameStreamDialogEvent-dljcy1v9.js";import{t as p}from"./useGameStreamProps-h4pgc81o.js";import{t as m}from"./useGameStreamDialogContext-ivl0rv5q.js";import{s as h}from"./PureInStreamConfirmationDialog.styles-f9kkr64u.js";var g=e(n(),1),_=e(c(),1);r(`w-template-overlays-modal-size-small-width-compact`,`xsl-10:w-[420px]`,`density-low:(lg-20:w-template-overlays-modal-size-medium-width-centered)`,`density-high:(lg-10:w-template-overlays-modal-size-medium-width-centered)`,`rounded-lg bg-container-backgrounds-elevation-background-level-2`);var v=(0,_.default)(`flex flex-col items-center justify-center`,`pb-template-overlays-modal-container-padding-2-top-&-bottom`),y=(0,_.default)(`flex items-start justify-between self-stretch`,`py-internal-gap-regular`,`ps-template-overlays-modal-container-padding-2-left-&-right`,`pe-internal-gap-regular`),b=(0,_.default)(`flex flex-col items-start self-stretch`,`sbar`,`py-0`,`px-template-overlays-modal-container-padding-2-left-&-right`),x=(0,_.default)(`flex flex-col items-start self-stretch`,`gap-layout-vertical-related-content-in-a-section-tight`);r(`flex aspect-square items-center justify-center`,`w-template-states-illustration-medium`,`h-[144px] p-[18px]`,`xsl-20:(h-[176px] p-[22px])`,`xs-20:(h-[176px] p-[22px])`,`sm-10:(h-[192px] p-[24px])`,`density-low:(sm-25:(h-[224px] p-[28px]) xl-10:(h-[352px] p-[44px]))`,`density-high:(sm-25:(h-[192px] p-[24px]))`),r(`flex aspect-square shrink-0 flex-col items-center justify-center`,`h-[108px] w-[108px]`,`xsl-20:(h-[132px] w-[132px])`,`xs-20:(h-[132px] w-[132px])`,`sm-10:(h-[144px] w-[144px])`,`sm-25:(h-[168px] w-[168px])`,`xl-10:(h-[264px] w-[264px])`,`density-high:(sm-25:(h-[144px] w-[144px]))`),(0,_.default)(`flex shrink-0 grow basis-0`,`items-start gap-[8px]`,`text-noninteractive-content-primary-content type-title3`);var S=(0,_.default)(`flex items-start self-stretch`,`text-noninteractive-content-secondary-content type-body`),C=r(`flex flex-col items-center justify-center self-stretch`,`gap-layout-horizontal-gap`,`xsl-10:(max-w-none flex-row)`,`md-20:(max-w-none flex-row)`),w=(0,_.default)(`flex items-center justify-center self-stretch`,`min-w-component-action-text-standard-min-width`,`gap-[8px]`,`py-component-action-text-standard-container-padding-top-and-bottom`,`px-internal-container-padding-regular`,`shrink-0 grow basis-0`),T=t(),E=a(({locTitle:e,locDescription:t,buttons:n,defaultIndex:r,buttonsDisabled:i})=>{let a=[n?.buttonOne,n?.buttonTwo,n?.buttonThree]?.map((e,t)=>{if(e){let n=t===0?`brand`:`standard`;return(0,T.jsx)(o,{as:e.href?`a`:`button`,className:w,"data-auto-focus":r===t,onPress:()=>e.onPress(),isDisabled:i,kind:n,href:e.href,target:`_blank`,children:e.text},e.text)}else return null});return(0,T.jsxs)(`div`,{className:v,children:[(0,T.jsx)(d.NavigationHeader,{title:{title:{text:e,sizeClassName:`type-title2`}},className:y}),(0,T.jsx)(d.ScrollContainer,{className:b,children:(0,T.jsxs)(`div`,{className:x,children:[(0,T.jsx)(`div`,{className:S,children:t}),(0,T.jsx)(`div`,{className:C,children:a})]})})]})},({options:e,buttonTextOne:t,buttonTextTwo:n,buttonTextThree:r,title:a=``,description:o,defaultIndex:s})=>{let c=f(l.dialog.gameStream.systemUiMessage.fullPath,`complete`),d=f(l.dialog.gameStream.systemUiMessage.fullPath,`cancel`),p={buttonOne:t?{text:t,onPress:()=>c({buttonIndex:0})}:void 0,buttonTwo:n?{text:n,onPress:()=>c({buttonIndex:1})}:void 0,buttonThree:r?{text:r,onPress:()=>c({buttonIndex:2})}:void 0},{setDialogShellProps:_}=m(),v={accessibleTitle:a,accessibleDescription:o,dismissable:!0,className:h,autoHeight:!0,onWillClose:d};(0,g.useEffect)(()=>{_(v)},[v,_]);let[y,b]=(0,g.useState)((e&&i.AcceptUserInputAfterDelay)>0);return u(()=>{y&&b(!1)},2e3),{locTitle:a,locDescription:o,buttons:p,defaultIndex:s,buttonsDisabled:y}}),D=s(()=>{let e=p(`systemUiMessage`),t=E.useComponent();return e?(0,T.jsx)(t,{...e}):null},`SystemUiMessageDialog`);export{D as SystemUiMessageDialog,D as default,E as SystemUiMessageDialogConnection};