import{r as c,j as t,L as d}from"./vendor.Cge7vpB3.js";const _="_toastLayer_1qra7_15",m="_toastDialog_1qra7_22",h="_toastHeader_1qra7_45",x="_toastClose_1qra7_57",y="_toastSummary_1qra7_68",j="_toastActions_1qra7_81",L="_toastLink_1qra7_87",g="_toastDetails_1qra7_90",q="_toastPre_1qra7_98",s={toastLayer:_,toastDialog:m,toastHeader:h,toastClose:x,toastSummary:y,toastActions:j,toastLink:L,toastDetails:g,toastPre:q},C=r=>{const{type:o,message:l,raw:e,onClose:i}=r,[a,n]=c.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:l}}),!!e&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:s.toastActions,children:t.jsx(d,{className:s.toastLink,onClick:()=>n(!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.VmBAnms-.js.map
