(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".ui-toggle-switch{--handle-ml: 0;--body-bg: var(--bg-base-light);--body-shadow: var(--btn-group-shape-shadow);display:flex;align-items:center;gap:12px;outline:none}.ui-toggle-switch__body{width:40px;height:24px;display:flex;padding:5px;border-radius:12px;border:1px solid var(--color-ic-01);box-shadow:var(--body-shadow);background:var(--body-bg);cursor:pointer}.ui-toggle-switch__handle{width:12px;height:12px;border-radius:12px;border:1px solid var(--color-ic-01);background:var(--color-ic-00);margin-left:var(--handle-ml)}.ui-toggle-switch.active{--body-bg: var(--btn-switcher-bg);--handle-ml: auto}.ui-toggle-switch:focus-visible{--label-color: var(--txt-focus);--body-shadow: var(--btn-group-shape-shadow), 0 0 0 2px #fff, 0 0 0 4px var(--border-color-focus)}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
import { defineComponent as s, createElementBlock as o, openBlock as t, withKeys as i, normalizeClass as d, createElementVNode as a, createCommentVNode as m, toDisplayString as u } from "vue";

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