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