import '@das-fed/ui/packages/components/switch/style.css';
import { withInstall as u } from "@das-fed/utils/with-install/index";
import { setThemeRule as d } from "@das-fed/web/packages/theme/index";
import { defineComponent as m, computed as c, ref as f, onMounted as p, createElementBlock as _, openBlock as h, createVNode as w, unref as v, mergeProps as S } from "vue";
import { ElSwitch as b } from "element-plus";
import "element-plus/es/components/switch/style/css";
const x = { class: "das-ui-switch" }, B = {
  inheritAttrs: !1
}, V = /* @__PURE__ */ m({
  ...B,
  __name: "Index",
  props: {
    modelValue: { type: [Boolean, String, Number], default: !0 },
    size: { default: "small" }
  },
  setup(o, { expose: i }) {
    const e = o, s = c(() => e.modelValue), n = c(() => e.size ? e.size : "small"), a = f(null);
    return p(() => {
      var t, r;
      const l = (r = (t = a.value) == null ? void 0 : t.$el) == null ? void 0 : r.querySelector(".el-switch__input");
      l && l.setAttribute("tabindex", "-1");
    }), i({
      $refSwitch: a
    }), (l, t) => (h(), _("div", x, [
      w(v(b), S({
        ref_key: "$refSwitch",
        ref: a,
        modelValue: s.value,
        "onUpdate:modelValue": t[0] || (t[0] = (r) => s.value = r)
      }, l.$attrs, { size: n.value }), null, 16, ["modelValue", "size"])
    ]));
  }
}), z = (o, i) => {
  const e = o.__vccOpts || o;
  for (const [s, n] of i)
    e[s] = n;
  return e;
}, D = /* @__PURE__ */ z(V, [["__scopeId", "data-v-25cfdf31"]]), I = {
  "--das-ui-switch-on-color": "#5582F3",
  "--das-ui-switch-off-color": "#B2B2B2",
  "--das-ui-switch-on-color-disabled": "#B5CAFF",
  "--das-ui-switch-off-color-disabled": "#D9D9D9"
};
d(I);
const T = u(D);
export {
  T as DasSwitch,
  T as default
};
