import{At as e,Ct as t,Fr as n,H as r,Jn as i,L as a,Pr as o,Qt as s,St as c,U as l,Ut as u,Wt as d,Xt as f,Y as p,Yn as m,an as h,at as g,dn as _,dt as v,en as y,ft as b,it as x,kr as S,lt as C,or as w,ot as T,rt as E,sn as D,st as O,tr as k,un as A,ut as j,vt as M,wt as N,xt as P,yt as F}from"./index-DIJ6uZvT.js";var I=h(`v-alert-title`),L=_({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[[`x-small`,10],[`small`,16],[`default`,24],[`large`,28],[`x-large`,32]]}},`iconSize`);function R(e,t){return{iconSize:i(()=>{let n=new Map(e.iconSizes),r=e.iconSize??t()??`default`;return n.has(r)?n.get(r):r})}}var z=[`success`,`info`,`warning`,`error`],B=_({border:{type:[Boolean,String],validator:e=>typeof e==`boolean`||[`top`,`end`,`bottom`,`start`].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:y,default:`$close`},closeLabel:{type:String,default:`$vuetify.close`},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>z.includes(e)},...A(),...T(),...c(),...v(),...L(),...C(),...r(),...M(),...e(),...u(),...x({variant:`flat`})},`VAlert`),V=D()({name:`VAlert`,props:B(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,{emit:r,slots:i}){let c=s(e,`modelValue`),u=S(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:h}=R(e,()=>e.prominent?44:void 0),{themeClasses:_}=d(e),{colorClasses:v,colorStyles:y,variantClasses:x}=g(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:C}=O(e),{dimensionStyles:T}=t(e),{elevationClasses:D}=b(e),{locationStyles:A}=j(e),{positionClasses:M}=l(e),{roundedClasses:L}=F(e),{textColorClasses:z,textColorStyles:B}=P(()=>e.borderColor),{t:V}=f(),H=S(()=>({"aria-label":V(e.closeLabel),onClick(e){c.value=!1,r(`click:close`,e)}}));return()=>{let t=!!(i.prepend||u.value),r=!!(i.title||e.title),s=!!(i.close||e.closable),l={density:e.density,icon:u.value,size:e.iconSize||e.prominent?h.value:void 0};return c.value&&k(e.tag,{class:o([`v-alert`,e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?`start`:e.border}`]:!0},{"v-alert--prominent":e.prominent},_.value,v.value,C.value,D.value,M.value,L.value,x.value,e.class]),style:n([y.value,T.value,A.value,e.style]),role:`alert`},{default:()=>[E(!1,`v-alert`),e.border&&m(`div`,{key:`border`,class:o([`v-alert__border`,z.value]),style:n(B.value)},null),t&&m(`div`,{key:`prepend`,class:`v-alert__prepend`},[i.prepend?k(N,{key:`prepend-defaults`,disabled:!u.value,defaults:{VIcon:{...l}}},i.prepend):k(p,w({key:`prepend-icon`},l),null)]),m(`div`,{class:`v-alert__content`},[r&&k(I,{key:`title`},{default:()=>[i.title?.()??e.title]}),i.text?.()??e.text,i.default?.()]),i.append&&m(`div`,{key:`append`,class:`v-alert__append`},[i.append()]),s&&m(`div`,{key:`close`,class:`v-alert__close`},[i.close?k(N,{key:`close-defaults`,defaults:{VBtn:{icon:e.closeIcon,size:`x-small`,variant:`text`}}},{default:()=>[i.close?.({props:H.value})]}):k(a,w({key:`close-btn`,icon:e.closeIcon,size:`x-small`,variant:`text`},H.value),null)])]})}}});export{V as t};