import { createVNode as _createVNode } from "vue";
import "./styles/tag-group.css";
import { toRef } from "vue";
import { deepEqual } from "@veno-ui/utils";
import { makePaperProps, usePaper } from "../../composables/paper";
import { makeGroupProps, useGroup } from "../../composables/group";
import { provideDefaults } from "../../composables/defaults";
import { defineComponent } from "../../utils";
const TagGroupKey = Symbol.for("veno-ui:chip-group");
const TagGroup = defineComponent({
  name: "VeTagGroup",
  props: {
    column: Boolean,
    valueComparator: {
      type: Function,
      default: deepEqual
    },
    ...makeGroupProps({
      selectedClass: "ve-tag--active"
    }),
    ...makePaperProps({
      variant: "contained-text"
    })
  },
  emits: {
    "update:modelValue": (_modelValue) => true
  },
  setup(props, {
    slots
  }) {
    const {
      paperClasses,
      paperStyles
    } = usePaper(props);
    const {
      isSelected,
      select,
      next,
      prev,
      selected
    } = useGroup(props, TagGroupKey);
    provideDefaults({
      VeTag: {
        color: toRef(props, "color"),
        size: toRef(props, "size"),
        variant: toRef(props, "variant")
      }
    });
    return () => _createVNode(props.tag, {
      "class": ["ve-tag-group", {
        "ve-tag-group--column": props.column
      }, paperClasses.value],
      "style": paperStyles.value
    }, {
      default: () => [slots.default?.({
        isSelected,
        select,
        next,
        prev,
        selected: selected.value
      })]
    });
  }
});
export {
  TagGroup,
  TagGroupKey
};
//# sourceMappingURL=tag-group.mjs.map
