import{c as h}from"./VRow-BC7GmtAs.js";import{g as A,p as D,a1 as $,t as u,a as z,bO as R,aI as F,L as O,c as w,a9 as E,aa as N,d as j,am as M,ad as X,k as t,bP as Z,V as q,Z as d,R as G,S as H,bk as J,m as K,n as Q,o as U,ab as W,ac as Y,v as p,N as ee,aL as ae,x as te,X as le}from"./index-g0hxAASb.js";const ne=h("v-alert-title"),se=["success","info","warning","error"],oe=D({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(),...J({variant:"flat"})},"VAlert"),ce=A()({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:b,colorStyles:f,variantClasses:k}=R(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:P}=F(e),{dimensionStyles:V}=O(e),{elevationClasses:C}=w(e),{locationStyles:g}=E(e),{positionClasses:x}=N(e),{roundedClasses:S}=j(e),{textColorClasses:_,textColorStyles:B}=M(()=>e.borderColor),{t:I}=X(),i=u(()=>({"aria-label":I(e.closeLabel),onClick(s){o.value=!1,m("click:close",s)}}));return()=>{const s=!!(a.prepend||n.value),L=!!(a.title||e.title),T=!!(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,b.value,P.value,C.value,x.value,S.value,k.value,e.class],style:[f.value,V.value,g.value,e.style],role:"alert"},{default:()=>{var r,c;return[Z(!1,"v-alert"),e.border&&t("div",{key:"border",class:["v-alert__border",_.value],style:B.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"},[L&&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()]),T&&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(G,H({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},i.value),null)])]}})}}});export{ce as V,ne as a};
