import{ae as D,g as I,p as L,a6 as $,t as u,a as z,c0 as w,aZ as F,J as R,c as j,af as E,ag as M,d as O,aD as J,aj as N,k as t,c1 as X,V as Z,a3 as d,T as q,X as G,bw as H,m as K,n as Q,o as U,ah as W,ai as Y,v as p,M as ee,b0 as ae,x as te,a1 as le}from"./index-DHJ8t5vF.js";const ne=D("v-alert-title"),se=["success","info","warning","error"],oe=L({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=>se.includes(e)},...te(),...ae(),...ee(),...p(),...Y(),...W(),...U(),...Q(),...K(),...H({variant:"flat"})},"VAlert"),re=I()({name:"VAlert",props:oe(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,v){let{emit:m,slots:a}=v;const o=$(e,"modelValue"),n=u(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{themeClasses:y}=z(e),{colorClasses:f,colorStyles:b,variantClasses:k}=w(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:V}=F(e),{dimensionStyles:P}=R(e),{elevationClasses:C}=j(e),{locationStyles:g}=E(e),{positionClasses:x}=M(e),{roundedClasses:S}=O(e),{textColorClasses:_,textColorStyles:T}=J(()=>e.borderColor),{t:h}=N(),i=u(()=>({"aria-label":h(e.closeLabel),onClick(s){o.value=!1,m("click:close",s)}}));return()=>{const s=!!(a.prepend||n.value),B=!!(a.title||e.title),A=!!(a.close||e.closable);return o.value&&t(e.tag,{class:["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},y.value,f.value,V.value,C.value,x.value,S.value,k.value,e.class],style:[b.value,P.value,g.value,e.style],role:"alert"},{default:()=>{var r,c;return[X(!1,"v-alert"),e.border&&t("div",{key:"border",class:["v-alert__border",_.value],style:T.value},null),s&&t("div",{key:"prepend",class:"v-alert__prepend"},[a.prepend?t(d,{key:"prepend-defaults",disabled:!n.value,defaults:{VIcon:{density:e.density,icon:n.value,size:e.prominent?44:28}}},a.prepend):t(Z,{key:"prepend-icon",density:e.density,icon:n.value,size:e.prominent?44:28},null)]),t("div",{class:"v-alert__content"},[B&&t(ne,{key:"title"},{default:()=>{var l;return[((l=a.title)==null?void 0:l.call(a))??e.title]}}),((r=a.text)==null?void 0:r.call(a))??e.text,(c=a.default)==null?void 0:c.call(a)]),a.append&&t("div",{key:"append",class:"v-alert__append"},[a.append()]),A&&t("div",{key:"close",class:"v-alert__close"},[a.close?t(d,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var l;return[(l=a.close)==null?void 0:l.call(a,{props:i.value})]}}):t(q,G({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},i.value),null)])]}})}}});export{re as V,ne as a};
