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