import{bO as L,e2 as H,cc as T,di as Q,cW as R,cy as w,cx as F,bS as M,cC as O,d4 as ee,dd as ae,bd as r,b$ as le,I as l,ar as I,cS as C,dM as x,dv as te,cT as ne,cV as se,d5 as ie,cw as ce,e6 as de,dZ as oe,dh as ue,bT as re,dz as ve,cD as fe,cX as pe,cZ as me,cE as ke,e7 as ye,bU as be,d7 as he,e8 as Ce,q as V,bJ as D,aY as Ve,cI as Ie,dP as Pe,c5 as v,c7 as f,bz as ge,F as _,c4 as z}from"./index-DhjTmrEH.js";import{m as Se,V as E}from"./VSlideGroup-B1ukK6YJ.js";const $=Symbol.for("vuetify:v-chip-group"),Ae=L({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:H},...Se(),...T(),...Q({selectedClass:"v-chip--selected"}),...R(),...w(),...F({variant:"tonal"})},"VChipGroup");M()({name:"VChipGroup",props:Ae(),emits:{"update:modelValue":e=>!0},setup(e,p){let{slots:c}=p;const{themeClasses:o}=O(e),{isSelected:t,select:m,next:k,prev:y,selected:b}=ee(e,$);return ae({VChip:{color:r(e,"color"),disabled:r(e,"disabled"),filter:r(e,"filter"),variant:r(e,"variant")}}),le(()=>{const h=E.filterProps(e);return l(E,I(h,{class:["v-chip-group",{"v-chip-group--column":e.column},o.value,e.class],style:e.style}),{default:()=>{var u;return[(u=c.default)==null?void 0:u.call(c,{isSelected:t,select:m,next:k,prev:y,selected:b.value})]}})}),{}}});const Be=L({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:x(),onClickOnce:x(),...te(),...T(),...ne(),...se(),...ie(),...ce(),...de(),...oe(),...R({tag:"span"}),...w(),...F({variant:"tonal"})},"VChip"),De=M()({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:c,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:q}=me(e),{roundedClasses:K}=ke(e),{sizeClasses:X}=ye(e),{themeClasses:Z}=O(e),P=be(e,"modelValue"),a=he(e,$,!1),s=Ce(e,c),j=V(()=>e.link!==!1&&s.isLink.value),i=V(()=>!e.disabled&&e.link!==!1&&(!!a||e.link||s.isClickable.value)),J=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),i.value&&((d=s.navigate)==null||d.call(s,n),a==null||a.toggle())}function N(n){(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),g(n))}return()=>{const n=s.isLink.value?"a":e.tag,d=!!(e.appendIcon||e.appendAvatar),U=!!(d||t.append),W=!!(t.close||e.closable),S=!!(t.filter||e.filter)&&a,A=!!(e.prependIcon||e.prependAvatar),Y=!!(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":i.value,"v-chip--filter":S,"v-chip--pill":e.pill},Z.value,k.value,B?y.value:void 0,u.value,q.value,K.value,X.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:i.value?0:void 0,onClick:g,onKeydown:i.value&&!j.value&&N},s.linkProps),{default:()=>{var G;return[Ie(i.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]])]}),Y&&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(z,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),l("div",{class:"v-chip__content","data-no-activator":""},[((G=t.default)==null?void 0:G.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]),U&&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(z,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),W&&l("button",I({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},J.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"),i.value&&e.ripple,null]])}}});export{De as V};