"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../../node_modules/element-plus/es/index.js");
;/* empty css                                                                */
;/* empty css                                                                     */
const Vue = require("vue");
const index = require("../../../../../../node_modules/element-plus/es/components/switch/index.js");
const _sfc_main = /* @__PURE__ */ Object.assign({
  inheritAttrs: false
}, {
  __name: "Switch",
  props: {
    config: {
      type: Object,
      required: true
    },
    modelValue: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    readonly: {
      type: Boolean,
      default: false
    },
    activeText: {
      type: String,
      default: ""
    },
    inactiveText: {
      type: String,
      default: ""
    }
  },
  emits: ["update:modelValue", "change"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const inputValue = Vue.computed({
      get: () => props.modelValue,
      set: (val) => {
        emit("update:modelValue", val);
        emit("change", val);
      }
    });
    return (_ctx, _cache) => {
      const _component_el_switch = index.ElSwitch;
      return Vue.openBlock(), Vue.createBlock(_component_el_switch, Vue.mergeProps({
        modelValue: inputValue.value,
        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
      }, Vue.toHandlers(__props.config.eventHandlers), {
        disabled: __props.disabled,
        readonly: __props.readonly,
        "active-text": __props.activeText,
        "inactive-text": __props.inactiveText
      }), null, 16, ["modelValue", "disabled", "readonly", "active-text", "inactive-text"]);
    };
  }
});
exports.default = _sfc_main;
