{"version":3,"file":"VChipGroup.mjs","names":["makeVSlideGroupProps","VSlideGroup","makeComponentProps","provideDefaults","makeGroupProps","useGroup","makeTagProps","makeThemeProps","provideTheme","makeVariantProps","toRef","deepEqual","genericComponent","propsFactory","useRender","VChipGroupSymbol","Symbol","for","makeVChipGroupProps","column","Boolean","filter","valueComparator","type","Function","default","selectedClass","variant","VChipGroup","name","props","emits","value","setup","_ref","slots","themeClasses","isSelected","select","next","prev","selected","VChip","color","disabled","slideGroupProps","filterProps","_createVNode","_mergeProps","class","style"],"sources":["../../../src/components/VChipGroup/VChipGroup.tsx"],"sourcesContent":["// Styles\nimport './VChipGroup.sass'\n\n// Components\nimport { makeVSlideGroupProps, VSlideGroup } from '@/components/VSlideGroup/VSlideGroup'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { deepEqual, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { GenericProps } from '@/util'\n\nexport const VChipGroupSymbol = Symbol.for('vuetify:v-chip-group')\n\nexport const makeVChipGroupProps = propsFactory({\n  column: Boolean,\n  filter: Boolean,\n  valueComparator: {\n    type: Function as PropType<typeof deepEqual>,\n    default: deepEqual,\n  },\n\n  ...makeVSlideGroupProps(),\n  ...makeComponentProps(),\n  ...makeGroupProps({ selectedClass: 'v-chip--selected' }),\n  ...makeTagProps(),\n  ...makeThemeProps(),\n  ...makeVariantProps({ variant: 'tonal' } as const),\n}, 'VChipGroup')\n\ntype VChipGroupSlots = {\n  default: {\n    isSelected: (id: number) => boolean\n    select: (id: number, value: boolean) => void\n    next: () => void\n    prev: () => void\n    selected: readonly number[]\n  }\n}\n\nexport const VChipGroup = genericComponent<new <T>(\n  props: {\n    modelValue?: T\n    'onUpdate:modelValue'?: (value: T) => void\n  },\n  slots: VChipGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n  name: 'VChipGroup',\n\n  props: makeVChipGroupProps(),\n\n  emits: {\n    'update:modelValue': (value: any) => true,\n  },\n\n  setup (props, { slots }) {\n    const { themeClasses } = provideTheme(props)\n    const { isSelected, select, next, prev, selected } = useGroup(props, VChipGroupSymbol)\n\n    provideDefaults({\n      VChip: {\n        color: toRef(props, 'color'),\n        disabled: toRef(props, 'disabled'),\n        filter: toRef(props, 'filter'),\n        variant: toRef(props, 'variant'),\n      },\n    })\n\n    useRender(() => {\n      const slideGroupProps = VSlideGroup.filterProps(props)\n\n      return (\n        <VSlideGroup\n          { ...slideGroupProps }\n          class={[\n            'v-chip-group',\n            {\n              'v-chip-group--column': props.column,\n            },\n            themeClasses.value,\n            props.class,\n          ]}\n          style={ props.style }\n        >\n          { slots.default?.({\n            isSelected,\n            select,\n            next,\n            prev,\n            selected: selected.value,\n          })}\n        </VSlideGroup>\n      )\n    })\n\n    return {}\n  },\n})\n\nexport type VChipGroup = InstanceType<typeof VChipGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,oBAAoB,EAAEC,WAAW,0CAE1C;AAAA,SACSC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,gBAAgB,yCAEzB;AACA,SAASC,KAAK,QAAQ,KAAK;AAAA,SAClBC,SAAS,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAE7D;AAIA,OAAO,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AAElE,OAAO,MAAMC,mBAAmB,GAAGL,YAAY,CAAC;EAC9CM,MAAM,EAAEC,OAAO;EACfC,MAAM,EAAED,OAAO;EACfE,eAAe,EAAE;IACfC,I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