"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    renderSwitch: ()=>renderSwitch
});
const external_lit_namespaceObject = require("lit");
const if_defined_js_namespaceObject = require("lit/directives/if-defined.js");
const multi_class_map_cjs_namespaceObject = require("../../directives/multi-class-map.cjs");
const renderSwitch = ({ props })=>{
    const containerClasses = (0, multi_class_map_cjs_namespaceObject.tw)({
        'w-12 h-6 p-1 rounded-full': true,
        'bg-primary': props.checked,
        'bg-neutral': !props.checked
    });
    const handleClasses = (0, multi_class_map_cjs_namespaceObject.tw)({
        'w-4 h-4 rounded-full bg-white': true,
        'ml-6': props.checked
    });
    const buttonClasses = (0, multi_class_map_cjs_namespaceObject.tw)({
        'rounded-full btn-outline-neutral': true,
        flex: props.withToggle,
        hidden: !props.withToggle
    });
    return (0, external_lit_namespaceObject.html)`
    <button
      role="switch"
      class=${(0, multi_class_map_cjs_namespaceObject.multiClassMap)(buttonClasses)}
      aria-label=${(0, if_defined_js_namespaceObject.ifDefined)(props.ariaLabel)}
      aria-checked=${props.checked ? 'true' : 'false'}
      part=${(0, if_defined_js_namespaceObject.ifDefined)(props.part)}
      tabindex=${(0, if_defined_js_namespaceObject.ifDefined)(props.tabIndex)}
      title=${(0, if_defined_js_namespaceObject.ifDefined)(props.title)}
      @click=${()=>props.onToggle(!props.checked)}
    >
      <div class=${(0, multi_class_map_cjs_namespaceObject.multiClassMap)(containerClasses)}>
        <div class=${(0, multi_class_map_cjs_namespaceObject.multiClassMap)(handleClasses)}></div>
      </div>
    </button>
  `;
};
exports.renderSwitch = __webpack_exports__.renderSwitch;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderSwitch"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
