import{B as e,D as t,I as n,O as r,_ as i,g as a,j as o,m as s,n as c,s as l,v as u,y as d,z as f}from"./logo-sunshine-45-B0-ae2pw.js";var p=l(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),m=l(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),h=l(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),g=l(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),_=n({notifications:[],_nextId:1});function v(e,t,n){_.notifications.push({id:_._nextId++,type:e,message:null,title:null,messageKey:t,titleKey:n||null})}function y(e){return{danger:`AlertCircle`,warning:`AlertTriangle`,success:`CheckCircle`,info:`Info`}[e]||`Info`}var b={error:(e,t)=>v(`danger`,e,t),warning:(e,t)=>v(`warning`,e,t),success:(e,t)=>v(`success`,e,t),info:(e,t)=>v(`info`,e,t)},x={components:{AlertCircle:p,AlertTriangle:g,CheckCircle:m,Info:h},setup(){function e(e){let t=_.notifications.findIndex(t=>t.id===e);t!==-1&&_.notifications.splice(t,1)}return{state:_,dismiss:e,iconFor:y}}},S={key:0,class:`notification-container`},C={class:`flex-grow-1`},w={key:0},T=[`aria-label`,`onClick`];function E(n,c,l,p,m,h){return p.state.notifications.length>0?(t(),d(`div`,S,[(t(!0),d(s,null,r(p.state.notifications,r=>(t(),d(`div`,{key:r.id,class:f([`alert d-flex align-items-start gap-2 mb-2`,`alert-`+r.type]),role:`alert`},[(t(),i(o(p.iconFor(r.type)),{size:18,class:`icon flex-shrink-0 mt-1`})),a(`div`,C,[r.titleKey||r.title?(t(),d(`div`,w,[a(`strong`,null,e(r.titleKey?n.$t(r.titleKey):r.title),1)])):u(``,!0),a(`span`,null,e(r.messageKey?n.$t(r.messageKey):r.message),1)]),a(`button`,{type:`button`,class:`btn-close`,"aria-label":n.$t(`_common.dismiss`),onClick:e=>p.dismiss(r.id)},null,8,T)],2))),128))])):u(``,!0)}var D=c(x,[[`render`,E],[`__scopeId`,`data-v-921526d4`]]);export{m as a,h as i,b as n,p as o,g as r,D as t};