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