import { createVNode } from "vue";
import { makeGroupProps, useGroup } from "../../composables/group/index.mjs";
import { ButtonGroup } from "../button-group/button-group.mjs";
import { defineComponent } from "../../utils/define-component.mjs";
import { useRender } from "../../utils/dist/index.mjs";
const ButtonToggleKey = Symbol.for("veno-ui:button-toggle");
const ButtonToggle = defineComponent({
  name: "VeButtonToggle",
  props: {
    ...makeGroupProps({
      selectedClass: "ve-button--selected"
    })
  },
  emits: {
    "update:modelValue": (_value) => true
  },
  setup(props, {
    slots
  }) {
    const {
      isSelected,
      next,
      prev,
      select,
      selected
    } = useGroup(props, ButtonToggleKey);
    useRender(() => {
      return createVNode(ButtonGroup, {
        "class": "ve-button-toggle"
      }, {
        default: () => {
          var _a;
          return [(_a = slots.default) == null ? void 0 : _a.call(slots, {
            isSelected,
            next,
            prev,
            select,
            selected
          })];
        }
      });
    });
    return {
      next,
      prev,
      select
    };
  }
});
export {
  ButtonToggle,
  ButtonToggleKey
};
//# sourceMappingURL=button-toggle.mjs.map
