import { createVNode as _createVNode } from "vue";
import { useRender } from "@veno-ui/utils";
import { defineComponent } from "../../utils";
import { makeGroupProps, useGroup } from "../../composables/group";
import { ButtonGroup } from "../button-group";
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: () => [slots.default?.({
          isSelected,
          next,
          prev,
          select,
          selected
        })]
      });
    });
    return {
      next,
      prev,
      select
    };
  }
});
export {
  ButtonToggle,
  ButtonToggleKey
};
//# sourceMappingURL=button-toggle.mjs.map
