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]=`13570a32-124b-4eb3-b3a8-d4d8b14824e3`,e._sentryDebugIdIdentifier=`sentry-dbid-13570a32-124b-4eb3-b3a8-d4d8b14824e3`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Hm as n,jg as r,ln as i,ng as a,pi as o}from"./entry.client-mpghtlrl.js";import{rt as s}from"./xds-react-components-ihgca01z.js";import{l as c,n as l,p as u,t as d,u as f}from"./MessageCanvas-epwsnqhh.js";import{t as p}from"./GuideIllustration-pex5y7xc.js";import{t as m}from"./GuideL2Header-a2pogkf0.js";var h=e(r(),1),g=e(o(),1),_=t(),v=a(),y=()=>{let e=(0,_.c)(7),{locSomethingWentWrong:t,locGenericErrorSubheading:r}=n(),i;e[0]===t?i=e[1]:(i=t(),e[0]=t,e[1]=i);let a;e[2]===r?a=e[3]:(a=r(),e[2]=r,e[3]=a);let o;return e[4]!==i||e[5]!==a?(o=(0,v.jsx)(p,{title:i,subtitle:a,illustrationType:`error`}),e[4]=i,e[5]=a,e[6]=o):o=e[6],o},b=e=>{let t=(0,_.c)(37),{activeXuid:r,profiles:a,messages:o,hasMoreMessages:p,isPending:b,isError:S,isGroupChat:C,isSecondaryFolder:w,headerContent:T,headerMoreMenuItems:E,arePhotosEnabled:D,blurInputOnEnter:O,submitMessage:k,fetchMoreMessages:A}=e,[j,M]=(0,h.useState)(0),{addImagesFromFileList:N}=u(),P;t[0]===N?P=t[1]:(P=e=>{e.preventDefault(),M(0),N(e.dataTransfer.files)},t[0]=N,t[1]=P);let F=P,{locLoading:I}=n(),L;if(S){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,v.jsx)(`div`,{className:`flex flex-grow flex-col justify-center`,children:(0,v.jsx)(y,{})}),t[2]=e):e=t[2],L=e}else if(b){let e;t[3]===I?e=t[4]:(e=I(),t[3]=I,t[4]=e);let n;t[5]===e?n=t[6]:(n=(0,v.jsx)(`div`,{className:`flex flex-grow flex-col items-center justify-center`,children:(0,v.jsx)(`div`,{className:`size-[26px]`,children:(0,v.jsx)(s,{isIndeterminate:!0,"aria-label":e})})}),t[5]=e,t[6]=n),L=n}else if(o.length===0||!r){let e;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,v.jsx)(`div`,{className:`flex flex-grow flex-col justify-center`,children:(0,v.jsx)(l,{})}),t[7]=e):e=t[7],L=e}else{let e;t[8]!==o||t[9]!==p||t[10]!==a||t[11]!==r||t[12]!==C||t[13]!==w||t[14]!==A?(e=(0,v.jsx)(c,{className:`flex-grow overflow-y-auto`,children:(0,v.jsx)(d,{messages:o,hasMoreMessages:p,profiles:a,activeXuid:r,isGroupChat:C,isSecondaryFolder:w,fetchMoreMessages:A})}),t[8]=o,t[9]=p,t[10]=a,t[11]=r,t[12]=C,t[13]=w,t[14]=A,t[15]=e):e=t[15],L=e}let R=j>0,z;t[16]===R?z=t[17]:(z=(0,g.default)(`flex flex-col gap-layout-vertical-related-content-in-a-section-tight`,`h-full`,`pb-template-overlays-guide-padding-internal-top`,{"bg-template-overlays-backplate-non-interactive-guide-transparent-color-1":R}),t[16]=R,t[17]=z);let B,V;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(B=()=>M(e=>e+1),V=()=>M(e=>Math.max(0,e-1)),t[18]=B,t[19]=V):(B=t[18],V=t[19]);let H;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(H=()=>M(0),t[20]=H):H=t[20];let U;t[21]===j?U=t[22]:(U=j>0&&(0,v.jsx)(`div`,{className:(0,g.default)(`bg-template-overlays-backplate-non-interactive-guide-transparent-color-1`,`pointer-events-none absolute inset-0 z-10 opacity-50`)}),t[21]=j,t[22]=U);let W;t[23]!==T||t[24]!==E?(W=(0,v.jsx)(`div`,{className:`px-template-overlays-guide-padding-internal-left-&-right`,children:(0,v.jsx)(m,{content:T,moreMenuItems:E,className:`pt-template-overlays-guide-padding-internal-top`})}),t[23]=T,t[24]=E,t[25]=W):W=t[25];let G;t[26]!==k||t[27]!==D||t[28]!==O?(G=(0,v.jsx)(`div`,{className:`px-template-overlays-guide-padding-internal-left-&-right`,children:(0,v.jsx)(i,{children:(0,v.jsx)(f,{submitMessage:k,arePhotosEnabled:D,blurInputOnEnter:O})})}),t[26]=k,t[27]=D,t[28]=O,t[29]=G):G=t[29];let K;return t[30]!==z||t[31]!==F||t[32]!==U||t[33]!==W||t[34]!==L||t[35]!==G?(K=(0,v.jsxs)(`div`,{className:z,onDragEnter:B,onDragLeave:V,onDragOver:x,onDragEnd:H,onDrop:F,children:[U,W,L,G]}),t[30]=z,t[31]=F,t[32]=U,t[33]=W,t[34]=L,t[35]=G,t[36]=K):K=t[36],K};function x(e){return e.preventDefault()}export{y as n,b as t};