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