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