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