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