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