import { defineComponent as d, createElementBlock as o, openBlock as a, withKeys as m, normalizeClass as s, createElementVNode as n, createCommentVNode as u, toDisplayString as r } from "vue";
/* empty css                      */
const g = {
  key: 0,
  class: "label"
}, V = {
  name: "PlToggleSwitch"
}, p = /* @__PURE__ */ d({
  ...V,
  props: {
    label: {},
    modelValue: { type: Boolean }
  },
  emits: ["update:modelValue"],
  setup(l) {
    return (t, e) => (a(), o("div", {
      tabindex: "0",
      class: s(["ui-toggle-switch", { active: l.modelValue }]),
      onClick: e[0] || (e[0] = (i) => t.$emit("update:modelValue", !l.modelValue)),
      onKeydown: e[1] || (e[1] = m((i) => t.$emit("update:modelValue", !l.modelValue), ["enter"]))
    }, [
      e[2] || (e[2] = n("div", { class: "ui-toggle-switch__body" }, [
        n("div", { class: "ui-toggle-switch__handle" })
      ], -1)),
      l.label ? (a(), o("span", g, r(l.label), 1)) : u("", !0)
    ], 34));
  }
});
export {
  p as default
};
//# sourceMappingURL=PlToggleSwitch.vue.js.map
