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