import{bO as R,e4 as H,cc as T,dk as Q,cW as z,cy as w,cx as F,bS as O,cC as $,d6 as ee,df as ae,bd as r,b$ as le,I as l,ar as I,cS as C,dO as G,dx as te,cT as ne,cV as se,d7 as ce,cw as ie,e8 as de,d$ as oe,dj as ue,bT as re,dB as ve,cD as fe,cX as pe,cZ as me,cE as ke,e9 as ye,bU as be,d9 as he,ea as Ce,q as V,bJ as D,aY as Ve,cI as Ie,dR as Pe,c5 as v,c7 as f,bz as ge,F as _,c4 as E}from"./index-UvaAT40e.js";import{m as Se,V as L}from"./VSlideGroup-BkB-Mi6K.js";const M=Symbol.for("vuetify:v-chip-group"),Ae=R({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:H},...Se(),...T(),...Q({selectedClass:"v-chip--selected"}),...z(),...w(),...F({variant:"tonal"})},"VChipGroup");O()({name:"VChipGroup",props:Ae(),emits:{"update:modelValue":e=>!0},setup(e,p){let{slots:i}=p;const{themeClasses:o}=$(e),{isSelected:t,select:m,next:k,prev:y,selected:b}=ee(e,M);return ae({VChip:{color:r(e,"color"),disabled:r(e,"disabled"),filter:r(e,"filter"),variant:r(e,"variant")}}),le(()=>{const h=L.filterProps(e);return l(L,I(h,{class:["v-chip-group",{"v-chip-group--column":e.column},o.value,e.class],style:e.style}),{default:()=>{var u;return[(u=i.default)==null?void 0:u.call(i,{isSelected:t,select:m,next:k,prev:y,selected:b.value})]}})}),{}}});const Be=R({activeClass:String,appendAvatar:String,appendIcon:C,closable:Boolean,closeIcon:{type:C,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:String,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:C,ripple:{type:[Boolean,Object],default:!0},text:String,modelValue:{type:Boolean,default:!0},onClick:G(),onClickOnce:G(),...te(),...T(),...ne(),...se(),...ce(),...ie(),...de(),...oe(),...z({tag:"span"}),...w(),...F({variant:"tonal"})},"VChip"),De=O()({name:"VChip",directives:{Ripple:ue},props:Be(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,p){let{attrs:i,emit:o,slots:t}=p;const{t:m}=re(),{borderClasses:k}=ve(e),{colorClasses:y,colorStyles:b,variantClasses:h}=fe(e),{densityClasses:u}=pe(e),{elevationClasses:j}=me(e),{roundedClasses:q}=ke(e),{sizeClasses:K}=ye(e),{themeClasses:X}=$(e),P=be(e,"modelValue"),a=he(e,M,!1),s=Ce(e,i),J=V(()=>e.link!==!1&&s.isLink.value),c=V(()=>!e.disabled&&e.link!==!1&&(!!a||e.link||s.isClickable.value)),N=V(()=>({"aria-label":m(e.closeLabel),onClick(n){n.preventDefault(),n.stopPropagation(),P.value=!1,o("click:close",n)}}));function g(n){var d;o("click",n),c.value&&((d=s.navigate)==null||d.call(s,n),a==null||a.toggle())}function U(n){(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),g(n))}return()=>{const n=s.isLink.value?"a":e.tag,d=!!(e.appendIcon||e.appendAvatar),W=!!(d||t.append),Y=!!(t.close||e.closable),S=!!(t.filter||e.filter)&&a,A=!!(e.prependIcon||e.prependAvatar),Z=!!(A||t.prepend),B=!a||a.isSelected.value;return P.value&&D(l(n,I({class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":c.value,"v-chip--filter":S,"v-chip--pill":e.pill},X.value,k.value,B?y.value:void 0,u.value,j.value,q.value,K.value,h.value,a==null?void 0:a.selectedClass.value,e.class],style:[B?b.value:void 0,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:c.value?0:void 0,onClick:g,onKeydown:c.value&&!J.value&&U},s.linkProps),{default:()=>{var x;return[Ie(c.value,"v-chip"),S&&l(Pe,{key:"filter"},{default:()=>[D(l("div",{class:"v-chip__filter"},[t.filter?l(f,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},t.filter):l(v,{key:"filter-icon",icon:e.filterIcon},null)]),[[ge,a.isSelected.value]])]}),Z&&l("div",{key:"prepend",class:"v-chip__prepend"},[t.prepend?l(f,{key:"prepend-defaults",disabled:!A,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},t.prepend):l(_,null,[e.prependIcon&&l(v,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&l(E,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),l("div",{class:"v-chip__content","data-no-activator":""},[((x=t.default)==null?void 0:x.call(t,{isSelected:a==null?void 0:a.isSelected.value,selectedClass:a==null?void 0:a.selectedClass.value,select:a==null?void 0:a.select,toggle:a==null?void 0:a.toggle,value:a==null?void 0:a.value.value,disabled:e.disabled}))??e.text]),W&&l("div",{key:"append",class:"v-chip__append"},[t.append?l(f,{key:"append-defaults",disabled:!d,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},t.append):l(_,null,[e.appendIcon&&l(v,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&l(E,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),Y&&l("button",I({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},N.value),[t.close?l(f,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},t.close):l(v,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[Ve("ripple"),c.value&&e.ripple,null]])}}});export{De as V};