"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
  __name: "TuiSwitch",
  props: {
    modelValue: { type: Boolean },
    theme: {}
  },
  emits: ["update:modelValue"],
  setup(__props, { emit: __emit }) {
    const themeClass = Vue.computed(
      () => props.theme ? `tui-theme-${props.theme}` : ""
    );
    const props = __props;
    const emit = __emit;
    function toggleSwitch() {
      emit("update:modelValue", !props.modelValue);
    }
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", {
        class: Vue.normalizeClass([
          props.modelValue ? "switch-container" : "switch-container-active",
          themeClass.value
        ]),
        onClick: toggleSwitch
      }, _cache[0] || (_cache[0] = [
        Vue.createElementVNode("div", { class: "switch-core" }, null, -1)
      ]), 2);
    };
  }
});
exports.default = _sfc_main;
