import{At as e,Ct as t,H as n,Jn as r,L as i,Nr as a,Or as o,Pr as s,Qt as c,St as l,U as u,Ut as d,Wt as f,Xt as p,Y as m,Yn as h,an as g,at as _,dn as v,dt as y,en as b,ft as x,it 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-_iAfjd0d.js";var I=g(`v-alert-title`),L=v({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:r(()=>{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=v({border:{type:[Boolean,String],validator:e=>typeof e==`boolean`||[`top`,`end`,`bottom`,`start`].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:b,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(),...l(),...y(),...L(),...C(),...n(),...M(),...e(),...d(),...S({variant:`flat`})},`VAlert`),V=D()({name:`VAlert`,props:B(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,{emit:n,slots:r}){let l=c(e,`modelValue`),d=o(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:g}=R(e,()=>e.prominent?44:void 0),{themeClasses:v}=f(e),{colorClasses:y,colorStyles:b,variantClasses:S}=_(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:C}=O(e),{dimensionStyles:T}=t(e),{elevationClasses:D}=x(e),{locationStyles:A}=j(e),{positionClasses:M}=u(e),{roundedClasses:L}=F(e),{textColorClasses:z,textColorStyles:B}=P(()=>e.borderColor),{t:V}=p(),H=o(()=>({"aria-label":V(e.closeLabel),onClick(e){l.value=!1,n(`click:close`,e)}}));return()=>{let t=!!(r.prepend||d.value),n=!!(r.title||e.title),o=!!(r.close||e.closable),c={density:e.density,icon:d.value,size:e.iconSize||e.prominent?g.value:void 0};return l.value&&k(e.tag,{class:a([`v-alert`,e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?`start`:e.border}`]:!0},{"v-alert--prominent":e.prominent},v.value,y.value,C.value,D.value,M.value,L.value,S.value,e.class]),style:s([b.value,T.value,A.value,e.style]),role:`alert`},{default:()=>[E(!1,`v-alert`),e.border&&h(`div`,{key:`border`,class:a([`v-alert__border`,z.value]),style:s(B.value)},null),t&&h(`div`,{key:`prepend`,class:`v-alert__prepend`},[r.prepend?k(N,{key:`prepend-defaults`,disabled:!d.value,defaults:{VIcon:{...c}}},r.prepend):k(m,w({key:`prepend-icon`},c),null)]),h(`div`,{class:`v-alert__content`},[n&&k(I,{key:`title`},{default:()=>[r.title?.()??e.title]}),r.text?.()??e.text,r.default?.()]),r.append&&h(`div`,{key:`append`,class:`v-alert__append`},[r.append()]),o&&h(`div`,{key:`close`,class:`v-alert__close`},[r.close?k(N,{key:`close-defaults`,defaults:{VBtn:{icon:e.closeIcon,size:`x-small`,variant:`text`}}},{default:()=>[r.close?.({props:H.value})]}):k(i,w({key:`close-btn`,icon:e.closeIcon,size:`x-small`,variant:`text`},H.value),null)])]})}}});export{V as t};