import{aa as w,ab as I,ad as h,ap as N,R as a,af as S,aq as k,ai as x,an as z}from"./index-CNWvE5qA.js";var f={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const P={},$=x((o,{radius:l,color:t,variant:s,autoContrast:n})=>{const r=o.variantColorResolver({color:t||o.primaryColor,theme:o,variant:s||"light",autoContrast:n});return{root:{"--alert-radius":l===void 0?void 0:z(l),"--alert-bg":t||s?r.background:void 0,"--alert-color":r.color,"--alert-bd":t||s?r.border:void 0}}}),E=w((o,l)=>{const t=I("Alert",P,o),{classNames:s,className:n,style:r,styles:_,unstyled:m,vars:g,radius:q,color:L,title:i,children:v,id:C,icon:b,withCloseButton:u,onClose:B,closeButtonLabel:R,variant:c,autoContrast:V,...A}=t,e=h({name:"Alert",classes:f,props:t,className:n,style:r,classNames:s,styles:_,unstyled:m,vars:g,varsResolver:$}),d=N(C),p=i&&`${d}-title`||void 0,y=`${d}-body`;return a.createElement(S,{id:d,...e("root",{variant:c}),variant:c,ref:l,...A,role:"alert","aria-describedby":y,"aria-labelledby":p},a.createElement("div",{...e("wrapper")},b&&a.createElement("div",{...e("icon")},b),a.createElement("div",{...e("body")},i&&a.createElement("div",{...e("title"),"data-with-close-button":u||void 0},a.createElement("span",{id:p,...e("label")},i)),v&&a.createElement("div",{id:y,...e("message"),"data-variant":c},v)),u&&a.createElement(k,{...e("closeButton"),onClick:B,variant:"transparent",size:16,iconSize:16,"aria-label":R,unstyled:m})))});E.classes=f;E.displayName="@mantine/core/Alert";export{E as A};