import{d as m,r as f,f as h,al as v,h as o,C as t,k as l,o as s,a9 as k,q as w,i as c,V as T,j as y,s as B,m as C}from"./Cvzsf6pb.js";const g={class:"alert__icon"},H={class:"alert__content"},L=["innerHTML"],M=["innerHTML"],N={success:"check-circle",warning:"alert-triangle",error:"alert-circle",info:"info"},V=["info","success","warning","error"],b=m({__name:"TappAlert",props:{show:{type:Boolean,default:!0},dismissable:{type:Boolean,default:!1},variant:{default:V[0]},title:{default:void 0},text:{default:void 0}},emits:["closed"],setup(i,{emit:_}){const u=_,a=i,n=f(a.show),d=h(()=>N[a.variant]);v(()=>a.show,e=>{n.value=e});function p(){return n.value=!1,u("closed",!0)}return(e,x)=>{const r=T;return l(n)?(s(),o("div",{key:0,role:"alert",class:k(["alert",`alert--${e.variant}`]),"data-testid":"alert-status"},[e.dismissable?(s(),w(r,{key:0,class:"alert__icon-close",icon:"x",size:24,onClick:p})):t("",!0),c("span",g,[y(r,{icon:l(d),size:24},null,8,["icon"])]),c("section",H,[e.title?(s(),o("p",{key:0,class:"alert__title",innerHTML:e.title},null,8,L)):t("",!0),e.text?(s(),o("p",{key:1,class:"alert__text",innerHTML:e.text},null,8,M)):t("",!0),B(e.$slots,"default",{},void 0,!0)])],2)):t("",!0)}}}),A=Object.assign(C(b,[["__scopeId","data-v-96967a6c"]]),{__name:"TappAlert"});export{A as _}; //# sourceMappingURL=BMmwfXzG.js.map