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