"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const index_esm = require("../../../@vant/use/dist/index.esm.js");
const props = require("../utils/props.js");
const create = require("../utils/create.js");
const [name, bem] = create.createNamespace("sidebar");
const SIDEBAR_KEY = Symbol(name);
const sidebarProps = {
  modelValue: props.makeNumericProp(0)
};
var stdin_default = Vue.defineComponent({
  name,
  props: sidebarProps,
  emits: ["change", "update:modelValue"],
  setup(props2, {
    emit,
    slots
  }) {
    const {
      linkChildren
    } = index_esm.useChildren(SIDEBAR_KEY);
    const getActive = () => +props2.modelValue;
    const setActive = (value) => {
      if (value !== getActive()) {
        emit("update:modelValue", value);
        emit("change", value);
      }
    };
    linkChildren({
      getActive,
      setActive
    });
    return () => {
      var _a;
      return Vue.createVNode("div", {
        "role": "tablist",
        "class": bem()
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
    };
  }
});
exports.SIDEBAR_KEY = SIDEBAR_KEY;
exports.default = stdin_default;
exports.sidebarProps = sidebarProps;
