(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 d, createElementBlock as o, openBlock as a, withKeys as m, normalizeClass as s, createElementVNode as n, createCommentVNode as u, toDisplayString as r } from "vue";

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
