import '@das-fed/upf-ui/packages/components/switch/style.css';
import { withInstall as d } from "@das-fed/upf-utils/with-install/index";
import { defineComponent as f, computed as r, ref as _, onMounted as S, openBlock as h, createElementBlock as v, normalizeStyle as w, createVNode as z, unref as x, mergeProps as y } from "vue";
import { ElSwitch as V } from "element-plus";
import "element-plus/es/components/switch/style/css";
const g = {
  inheritAttrs: !1
}, b = /* @__PURE__ */ f({
  ...g,
  __name: "Index",
  props: {
    modelValue: { type: [Boolean, String, Number], default: !0 },
    size: { default: "small" },
    formSize: {}
  },
  setup(o, { expose: n }) {
    const e = o, l = r(() => e.modelValue), i = r(() => e.size ? e.size : "small"), c = _(null), m = () => {
      var t, a;
      const s = (a = (t = c.value) == null ? void 0 : t.$el) == null ? void 0 : a.querySelector(".el-switch__input");
      s && s.setAttribute("tabindex", "-1");
    }, u = r(() => e.formSize), p = r(() => ({
      "--switch-height": u.value && {
        small: "24px",
        default: "32px",
        large: "40px"
      }[u.value]
    }));
    return S(m), n({
      $refSwitch: c
    }), (s, t) => (h(), v(
      "div",
      {
        class: "das-ui-switch",
        style: w(p.value)
      },
      [
        z(x(V), y({
          ref_key: "$refSwitch",
          ref: c,
          modelValue: l.value,
          "onUpdate:modelValue": t[0] || (t[0] = (a) => l.value = a)
        }, s.$attrs, { size: i.value }), null, 16, ["modelValue", "size"])
      ],
      4
      /* STYLE */
    ));
  }
}), k = (o, n) => {
  const e = o.__vccOpts || o;
  for (const [l, i] of n)
    e[l] = i;
  return e;
}, I = /* @__PURE__ */ k(b, [["__scopeId", "data-v-c486ad97"]]), E = d(I);
export {
  E as DasSwitch,
  E as default
};
