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