import{r as n,j as t,L as d}from"./vendor.Cge7vpB3.js";const _="_toastLayer_1c0k2_15",m="_toastDialog_1c0k2_22",h="_toastHeader_1c0k2_45",k="_toastClose_1c0k2_58",x="_toastSummary_1c0k2_69",y="_toastActions_1c0k2_82",j="_toastLink_1c0k2_88",L="_toastDetails_1c0k2_91",g="_toastPre_1c0k2_99",s={toastLayer:_,toastDialog:m,toastHeader:h,toastClose:k,toastSummary:x,toastActions:y,toastLink:j,toastDetails:L,toastPre:g},C=l=>{const{type:o,message:c,raw:e,onClose:i}=l,[a,r]=n.useState(!1);return t.jsx("div",{className:s.toastLayer,children:t.jsxs("section",{className:s.toastDialog,role:"alertdialog","aria-labelledby":"toast-title","aria-describedby":"toast-desc","aria-modal":"false",children:[t.jsxs("div",{className:s.toastHeader,children:[t.jsx("h2",{id:"toastTitle",style:{borderColor:o==="info"?"#0dcaf0":"#dc3545"},children:o==="info"?"Important information":"Something went wrong"}),t.jsx("button",{className:s.toastClose,"aria-label":"Close",onClick:i,children:"✕"})]}),t.jsx("p",{id:"toastDesc",className:s.toastSummary,dangerouslySetInnerHTML:{__html:c}}),!!e&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:s.toastActions,children:t.jsx(d,{className:s.toastLink,onClick:()=>r(!a),children:a?"Hide details":"Show details"})}),a&&t.jsx("div",{className:s.toastDetails,children:t.jsx("pre",{className:s.toastPre,children:e})})]})]})})};export{C as T};
//# sourceMappingURL=Toast.Dc3cE2uX.js.map
