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