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]=`cd408e76-f49c-4fbe-923d-09da706206ec`,e._sentryDebugIdIdentifier=`sentry-dbid-cd408e76-f49c-4fbe-923d-09da706206ec`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,H as r,K as i,Qh as a,Qm as o,Wm as s,Yh as c,Zm as l,_r as u,hh as d,ng as f,pi as p}from"./entry.client-mpghtlrl.js";import{F as m,P as h,it as g}from"./xds-react-components-ihgca01z.js";import{Ft as _,Pt as v}from"./xds-icons-m106f2fc.js";var y=n(),b=e(p(),1),x=f(),S=u(e=>{let n=(0,y.c)(31),{background:a,className:o,handlePress:s,isCloaked:c,isFullySignedIn:l,isDataReady:u}=e,{t:d}=t(`UserPresenceDropdown`),{locOnline:f}=r();if(!u||!l)return null;let p=c?`offline`:`online`,S;n[0]===s?S=n[1]:(S=e=>{s(e!==`online`)},n[0]=s,n[1]=S);let C=S,w;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,x.jsx)(v,{className:`text-feedback-status-standard-content-icon-okay-or-online`}),n[2]=w):w=n[2];let T=w,E;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,x.jsx)(i,{className:`text-feedback-status-standard-content-icon-pending-or-offline`}),n[3]=E):E=n[3];let D=E,O;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,x.jsx)(_,{className:`text-item-invisible-container-default-content-primary-rest type-subtitle2`}),n[4]=O):O=n[4];let k=O,A;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(A={autoFocus:!0,trapFocus:!0,enableGamepad:!0,initialFocusLocationStrategy:`first-child`},n[5]=A):A=n[5];let j;n[6]===o?j=n[7]:(j=(0,b.default)(`items-center gap-internal-icon-and-text-gap-loose self-stretch bg-container-backgrounds-elevation-background-level-4 !px-component-item-list-container-padding-right-and-left !py-component-item-list-container-padding-top-and-bottom`,o),n[6]=o,n[7]=j);let M=c?D:T,N;n[8]===d?N=n[9]:(N=d(`Status`,{shortKey:`presence_status`}),n[8]=d,n[9]=N);let P;n[10]===N?P=n[11]:(P=(0,x.jsx)(h,{children:N}),n[10]=N,n[11]=P);let F=!c,I;n[12]===f?I=n[13]:(I=f(!0),n[12]=f,n[13]=I);let L;n[14]!==F||n[15]!==I?(L=(0,x.jsx)(g,{id:`online`,isSelected:F,label:I,leadingIcon:T,trailingIcon:k}),n[14]=F,n[15]=I,n[16]=L):L=n[16];let R;n[17]===f?R=n[18]:(R=f(!1),n[17]=f,n[18]=R);let z;n[19]!==c||n[20]!==R?(z=(0,x.jsx)(g,{id:`offline`,isSelected:c,label:R,leadingIcon:D,trailingIcon:k}),n[19]=c,n[20]=R,n[21]=z):z=n[21];let B;return n[22]!==p||n[23]!==j||n[24]!==C||n[25]!==M||n[26]!==a||n[27]!==P||n[28]!==L||n[29]!==z?(B=(0,x.jsxs)(m,{focusBehavior:A,selectedItem:p,className:j,onSelectionChange:C,show:`both`,selectedItemIcon:M,background:a,children:[P,L,z]}),n[22]=p,n[23]=j,n[24]=C,n[25]=M,n[26]=a,n[27]=P,n[28]=L,n[29]=z,n[30]=B):B=n[30],B},e=>{let{services:t}=l(),{data:n,isPending:r,isError:i}=a(t.cloaking.queries.isUserPresenceCloaked.getOptions()),{isFullySignedIn:u,isPending:f,isError:p}=s(),m=!r&&!f&&!i&&!p,{mutate:h}=c(t.cloaking.mutations.cloakUserPresence.getOptions()),{mutate:g}=c(t.cloaking.mutations.uncloakUserPresence.getOptions()),{trackUserAction:_}=o(),v=e=>{let t=e?`Offline`:`Online`;(e?h:g)(void 0,{onSuccess:()=>{_(`AppearOfflineToggle`,{appear:t,wasSuccessful:!0},d.Change)},onError:()=>{_(`AppearOfflineToggle`,{appear:t,wasSuccessful:!1},d.Change)}})};return{...e,handlePress:v,isCloaked:n??!1,isFullySignedIn:u,isDataReady:m}});export{S as t};