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