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]=`61395656-fdd5-47bd-bd3c-16a67540081d`,e._sentryDebugIdIdentifier=`sentry-dbid-61395656-fdd5-47bd-bd3c-16a67540081d`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Fr as r,Hm as i,Um as a,Yh as o,Zm as s,_r as c,hi as l,ng as u,pi as d,qh as f}from"./entry.client-mpghtlrl.js";import{ft as p}from"./xds-react-components-ihgca01z.js";import{n as m}from"./DialogShell-ga7ic6wy.js";import{t as h}from"./ConfirmationDialog-gwsu4d5l.js";var g=e(d(),1),_=n(),v=u(),y=c(e=>{let n=(0,_.c)(20),{name:r,onRemove:a,onCancel:o}=e,{t:s}=t(`RemotePlay`),{locCancel:c}=i(),l;n[0]===s?l=n[1]:(l=s(`Remove this console?`,{shortKey:`remove_console_prompt_a1b2c3`}),n[0]=s,n[1]=l);let u;n[2]!==r||n[3]!==s?(u=s(`This will remove "{name}" from your remote play list.`,{shortKey:`remove_console_confirmation_a1b2c3`,values:{name:r}}),n[2]=r,n[3]=s,n[4]=u):u=n[4];let d;n[5]===s?d=n[6]:(d=s(`Yes, remove it`,{shortKey:`remove_f5d3e1`}),n[5]=s,n[6]=d);let f;n[7]!==d||n[8]!==a?(f={text:d,onPress:a,kind:`destructive`},n[7]=d,n[8]=a,n[9]=f):f=n[9];let p;n[10]===c?p=n[11]:(p=c(),n[10]=c,n[11]=p);let m;n[12]!==p||n[13]!==o?(m={text:p,onPress:o},n[12]=p,n[13]=o,n[14]=m):m=n[14];let g;return n[15]!==l||n[16]!==u||n[17]!==f||n[18]!==m?(g=(0,v.jsx)(h,{illustration:`error`,title:l,prompt:u,firstButton:f,secondButton:m}),n[15]=l,n[16]=u,n[17]=f,n[18]=m,n[19]=g):g=n[19],g},({deviceId:e,name:t})=>{let n=a().getLogger(`RemoveConsoleDialog`),{remotePlay:r,dialog:i}=s(),{mutateAsync:c}=o(r.mutations.removeConsole.getActiveUserMutation()),{mutate:l}=o(i.mutations.goBack.getOptions());return{name:t,onRemove:async()=>{try{await c({deviceId:e}),l()}catch(t){let r=f(t);n.error(`Failed to remove console with id ${e}`,r)}},onCancel:()=>l()}}),b=e=>{let t=(0,_.c)(15),n=m.useComponent(),i=y.useComponent(),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={edge:`bottom`,centered:!0},t[0]=a):a=t[0];let o=p(a),s;t[1]===o?s=t[2]:(s=r(o),t[1]=o,t[2]=s);let c=s,u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u={default:!0,MD_10:!1},t[3]=u):u=t[3];let{data:d}=l(u),f=d?c:void 0,h=!d,b;t[4]!==h||t[5]!==d?(b=(0,g.default)(`modal-medium w-template-overlays-modal-size-medium-width-centered flex flex-col bg-container-backgrounds-elevation-background-level-4 bg-cover`,{"modal-floating":h,"modal-docked":d}),t[4]=h,t[5]=d,t[6]=b):b=t[6];let x;t[7]!==i||t[8]!==e?(x=(0,v.jsx)(i,{...e}),t[7]=i,t[8]=e,t[9]=x):x=t[9];let S;return t[10]!==n||t[11]!==b||t[12]!==f||t[13]!==x?(S=(0,v.jsx)(n,{className:b,autoHeight:!0,positionStyle:f,children:x}),t[10]=n,t[11]=b,t[12]=f,t[13]=x,t[14]=S):S=t[14],S};export{b as RemoveConsoleDialog,b as default};