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