import{d0 as D,p as S,i as M,g as w,j as E,t as d,G as F,ca as N,d as R,bZ as j,e as O,cC as q,c9 as G,f as Z,ao as p,I as H,o as l,q as v,r as m,cc as J,v as K,x as Q,z as U,cd as W,ce as X,A as Y,b$ as ee,B as ae,C as te,cA as le,ci as se,E as s,aL as ne,ae as y,an as f,M as oe}from"./index-BRUnowC8.js";const ie=D("v-alert-title"),ce=S({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize");function re(e,n){return{iconSize:M(()=>{const a=new Map(e.iconSizes),t=e.iconSize??n()??"default";return a.has(t)?a.get(t):t})}}const ue=["success","info","warning","error"],de=S({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:le,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=>ue.includes(e)},...te(),...ae(),...ee(),...Y(),...ce(),...X(),...W(),...U(),...Q(),...K(),...J({variant:"flat"})},"VAlert"),me=w()({name:"VAlert",props:de(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,n){let{emit:c,slots:a}=n;const t=E(e,"modelValue"),o=d(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:b}=re(e,()=>e.prominent?44:void 0),{themeClasses:k}=F(e),{colorClasses:C,colorStyles:P,variantClasses:z}=N(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:V}=R(e),{dimensionStyles:g}=j(e),{elevationClasses:x}=O(e),{locationStyles:_}=q(e),{positionClasses:A}=G(e),{roundedClasses:B}=Z(e),{textColorClasses:I,textColorStyles:h}=p(()=>e.borderColor),{t:T}=H(),r=d(()=>({"aria-label":T(e.closeLabel),onClick(i){t.value=!1,c("click:close",i)}}));return()=>{const i=!!(a.prepend||o.value),L=!!(a.title||e.title),$=!!(a.close||e.closable),u={density:e.density,icon:o.value,size:e.iconSize||e.prominent?b.value:void 0};return t.value&&l(e.tag,{class:m(["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},k.value,C.value,V.value,x.value,A.value,B.value,z.value,e.class]),style:v([P.value,g.value,_.value,e.style]),role:"alert"},{default:()=>[se(!1,"v-alert"),e.border&&s("div",{key:"border",class:m(["v-alert__border",I.value]),style:v(h.value)},null),i&&s("div",{key:"prepend",class:"v-alert__prepend"},[a.prepend?l(f,{key:"prepend-defaults",disabled:!o.value,defaults:{VIcon:{...u}}},a.prepend):l(ne,y({key:"prepend-icon"},u),null)]),s("div",{class:"v-alert__content"},[L&&l(ie,{key:"title"},{default:()=>[a.title?.()??e.title]}),a.text?.()??e.text,a.default?.()]),a.append&&s("div",{key:"append",class:"v-alert__append"},[a.append()]),$&&s("div",{key:"close",class:"v-alert__close"},[a.close?l(f,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>[a.close?.({props:r.value})]}):l(oe,y({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},r.value),null)])]})}}});export{me as V,ie as a};
