import{t as e}from"./jsx-runtime-CiQ1k8xo.js";import{t}from"./clsx-BcPLHiun.js";import{lt as n}from"./vscode-api-DjORcpSo.js";import{c as r}from"./lib-MoKmYgcO.js";import{t as i}from"./x-DypUcSQe.js";var a=n(),o=e();function s(e){let n=(0,a.c)(22),s=r(),{className:c,level:l,fullWidth:u,children:d,icon:f,onRemove:p,testId:m}=e,h=l===void 0?`info`:l,g=h===`info`,_=h===`success`,v=h===`warning`,y=h===`danger`,b;n[0]!==c||n[1]!==u||n[2]!==g||n[3]!==_||n[4]!==v||n[5]!==y?(b=t(`alert-root inline-flex flex-row items-start gap-1.5 rounded-2xl px-2 py-2 text-base leading-[1.4] pointer-events-auto box-shadow-lg border text-token-foreground`,{flex:u,"border-token-border bg-token-dropdown-background":g,"border-token-border bg-token-input-validation-info-background":_,"border-token-input-validation-warning-border bg-token-input-validation-warning-background":v,"border-token-input-validation-error-border bg-token-input-validation-error-background":y},c),n[0]=c,n[1]=u,n[2]=g,n[3]=_,n[4]=v,n[5]=y,n[6]=b):b=n[6];let x=b,S;n[7]===f?S=n[8]:(S=f?(0,o.jsx)(`div`,{className:`shrink-0 grow-0`,children:(0,o.jsx)(f,{className:`icon-sm`})}):null,n[7]=f,n[8]=S);let C;n[9]===d?C=n[10]:(C=typeof d==`string`?(0,o.jsx)(`div`,{className:`font-medium`,children:d}):d,n[9]=d,n[10]=C);let w;n[11]===C?w=n[12]:(w=(0,o.jsx)(`div`,{className:`flex-1 justify-center gap-2`,children:C}),n[11]=C,n[12]=w);let T;n[13]!==s||n[14]!==p?(T=p?(0,o.jsx)(`button`,{type:`button`,onClick:p,"aria-label":s.formatMessage({id:`codex.alert.closeAriaLabel`,defaultMessage:`Close`,description:`Aria label for the close button on an alert/toast component`}),className:`mt-0.5 flex shrink-0 grow-0 cursor-interaction rounded-full opacity-50 hover:bg-token-button-secondary-hover-background/5 hover:opacity-80`,children:(0,o.jsx)(i,{className:`icon-xs`})}):null,n[13]=s,n[14]=p,n[15]=T):T=n[15];let E;return n[16]!==x||n[17]!==S||n[18]!==w||n[19]!==T||n[20]!==m?(E=(0,o.jsxs)(`div`,{className:x,role:`alert`,"data-testid":m,children:[S,w,T]}),n[16]=x,n[17]=S,n[18]=w,n[19]=T,n[20]=m,n[21]=E):E=n[21],E}export{s as t};
//# sourceMappingURL=alert-tipXLgmQ.js.map