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