import{ac as D,bx as Y,ad as E,bd as Q,ae as L,ak as R,bK as z,af as F,bE as T,bg as U,b2 as Z,an as r,ag as ee,q as l,ah as y,c5 as B,bH as ae,bq as le,bI as te,cj as ne,aj as se,c7 as ce,bJ as ie,c8 as de,ap as oe,ca as ue,cb as re,br as ve,cd as fe,ao as pe,ck as ke,aW as me,cl as be,c9 as he,J as C,N as x,cf as ye,cg as Ce,cm as Ve,A as v,bY as f,O as ge,F as _,R as G,K as Ie}from"./index-2e57ee69.js";const w=Symbol.for("vuetify:v-chip-group"),Pe=D({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Y},...E(),...Q({selectedClass:"v-chip--selected"}),...L(),...R(),...z({variant:"tonal"})},"VChipGroup");F()({name:"VChipGroup",props:Pe(),emits:{"update:modelValue":e=>!0},setup(e,p){let{slots:i}=p;const{themeClasses:o}=T(e),{isSelected:t,select:k,next:m,prev:b,selected:h}=U(e,w);return Z({VChip:{color:r(e,"color"),disabled:r(e,"disabled"),filter:r(e,"filter"),variant:r(e,"variant")}}),ee(()=>l(e.tag,{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:k,next:m,prev:b,selected:h.value})]}})),{}}});const Ae=D({activeClass:String,appendAvatar:String,appendIcon:y,closable:Boolean,closeIcon:{type:y,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:y,ripple:{type:[Boolean,Object],default:!0},text:String,modelValue:{type:Boolean,default:!0},onClick:B(),onClickOnce:B(),...ae(),...E(),...le(),...te(),...ne(),...se(),...ce(),...ie(),...L({tag:"span"}),...R(),...z({variant:"tonal"})},"VChip"),Be=F()({name:"VChip",directives:{Ripple:de},props:Ae(),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:k}=oe(),{borderClasses:m}=ue(e),{colorClasses:b,colorStyles:h,variantClasses:u}=re(e),{densityClasses:K}=ve(e),{elevationClasses:O}=fe(e),{roundedClasses:$}=pe(e),{sizeClasses:j}=ke(e),{themeClasses:q}=T(e),V=me(e,"modelValue"),a=be(e,w,!1),s=he(e,i),M=C(()=>e.link!==!1&&s.isLink.value),c=C(()=>!e.disabled&&e.link!==!1&&(!!a||e.link||s.isClickable.value)),J=C(()=>({"aria-label":k(e.closeLabel),onClick(n){n.stopPropagation(),V.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 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),H=!!(d||t.append),W=!!(t.close||e.closable),I=!!(t.filter||e.filter)&&a,P=!!(e.prependIcon||e.prependAvatar),X=!!(P||t.prepend),A=!a||a.isSelected.value;return V.value&&x(l(n,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":c.value,"v-chip--filter":I,"v-chip--pill":e.pill},q.value,m.value,A?b.value:void 0,K.value,O.value,$.value,j.value,u.value,a==null?void 0:a.selectedClass.value,e.class],style:[A?h.value:void 0,e.style],disabled:e.disabled||void 0,draggable:e.draggable,href:s.href.value,tabindex:c.value?0:void 0,onClick:g,onKeydown:c.value&&!M.value&&N},{default:()=>{var S;return[Ce(c.value,"v-chip"),I&&l(Ve,{key:"filter"},{default:()=>[x(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]])]}),X&&l("div",{key:"prepend",class:"v-chip__prepend"},[t.prepend?l(f,{key:"prepend-defaults",disabled:!P,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(G,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),l("div",{class:"v-chip__content"},[((S=t.default)==null?void 0:S.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]),H&&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(G,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),W&&l("div",Ie({key:"close",class:"v-chip__close"},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)])]}}),[[ye("ripple"),c.value&&e.ripple,null]])}}});export{Be as V};
