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]=`6c66485d-968e-4e1e-882d-49e747022d65`,e._sentryDebugIdIdentifier=`sentry-dbid-6c66485d-968e-4e1e-882d-49e747022d65`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{H as t,v as n,x as r}from"./xds-react-components-lks62tbl.js";import{Ag as i,Fg as a,Ig as o,Wn as s,eh as c,gn as l,or as u}from"./entry.client-dr7r6s9a.js";import{kn as d}from"./xds-icons-d7khcnpi.js";import{t as f}from"./useFormatAmountOfTime-njujwiij.js";import{t as p}from"./StyledBaseListItem-kp6wdn5e.js";var m=a(),h=e(u(),1),g=e(o(),1),_=(0,g.createContext)({}),v=()=>{let e=(0,g.useContext)(_);if(!e)throw Error(`This hook can only be used within the GuideSplitActionItem`);return e},y=i(),b=e=>{let i=(0,m.c)(31),{icon:a,content:o,menuItems:u,isRecent:_,timestampMs:b,onPress:x}=e,{referenceTime:S}=v(),C=f(b,S,!0),[w,T]=(0,g.useState)(!1),[E,D]=(0,g.useState)(!1),[O,k]=(0,g.useState)(!1),A=C&&!w&&!E&&!O,j=(0,g.useId)(),{locMoreOptions:M}=c(),N;i[0]===O?N=i[1]:(N=(0,h.default)(`gap-items-social-related-spacing-horizontal-alignment-graphic-&-text flex w-full flex-row rounded-regular`,{"bg-template-overlays-widget-backplate-bayside-guide-interactive-visible-focus":O}),i[0]=O,i[1]=N);let P,F,I,L;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>T(!0),F=()=>T(!1),I=()=>D(!0),L=()=>D(!1),i[2]=P,i[3]=F,i[4]=I,i[5]=L):(P=i[2],F=i[3],I=i[4],L=i[5]);let R;i[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,h.default)(`flex flex-row gap-component-item-notification-badge-and-asset-gap-regular`,`ms-[calc(0px-var(--V1VH)-var(--V1XW))]`),i[6]=R):R=i[6];let z=_?``:`invisible`,B;i[7]===z?B=i[8]:(B=(0,y.jsx)(n,{kind:`brand`,className:z}),i[7]=z,i[8]=B);let V;i[9]!==B||i[10]!==a?(V=(0,y.jsx)(r.LeadingIcon,{children:(0,y.jsxs)(`div`,{className:R,children:[B,a]})}),i[9]=B,i[10]=a,i[11]=V):V=i[11];let H;i[12]===o?H=i[13]:(H=(0,y.jsx)(r.Label1,{children:(0,y.jsx)(`div`,{className:`w-full text-start`,children:o})}),i[12]=o,i[13]=H);let U;i[14]!==x||i[15]!==V||i[16]!==H?(U=(0,y.jsxs)(p,{as:`button`,className:`!w-0 flex-grow gap-x-internal-icon-and-text-gap-action-separator`,onPress:x,children:[V,H]}),i[14]=x,i[15]=V,i[16]=H,i[17]=U):U=i[17];let W=`custom-trigger-dropdown-${j}`,G;i[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=e=>k(e),i[18]=G):G=i[18];let K;i[19]!==M||i[20]!==A||i[21]!==C?(K=e=>{let{toggleMenu:t,ref:n}=e;return(0,y.jsx)(l,{ref:n,as:`button`,className:(0,h.default)(`min-w-items-notification-split-action-button-width flex h-full flex-row`,`items-center justify-center p-component-action-icon-standard-container-padding-all`),kind:`commonIconInvisible`,onPress:t,"aria-label":M(),tooltipContent:M(),children:(0,y.jsxs)(`div`,{className:`grid`,children:[(0,y.jsx)(s,{icon:(0,y.jsx)(d,{}),size:`cta`,className:(0,h.default)(`col-start-1 row-start-1 m-auto`,{invisible:A})}),(0,y.jsx)(`span`,{className:(0,h.default)(`col-start-1 row-start-1 m-auto text-item-visible-container-default-content-secondary-rest type-subtitle3`,{invisible:!A}),children:C})]})})},i[19]=M,i[20]=A,i[21]=C,i[22]=K):K=i[22];let q;i[23]!==W||i[24]!==K||i[25]!==u?(q=(0,y.jsx)(`div`,{children:(0,y.jsx)(t,{overlayId:W,onOpenChange:G,backdrop:!0,portal:!0,trigger:K,children:u})}),i[23]=W,i[24]=K,i[25]=u,i[26]=q):q=i[26];let J;return i[27]!==N||i[28]!==U||i[29]!==q?(J=(0,y.jsxs)(`div`,{className:N,onMouseEnter:P,onMouseLeave:F,onFocus:I,onBlur:L,children:[U,q]}),i[27]=N,i[28]=U,i[29]=q,i[30]=J):J=i[30],J};export{_ as n,b as t};