"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.n = (module)=>{
        var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
(()=>{
    __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__, {
    renderCheckbox: ()=>renderCheckbox
});
const external_lit_namespaceObject = require("lit");
const if_defined_js_namespaceObject = require("lit/directives/if-defined.js");
const ref_js_namespaceObject = require("lit/directives/ref.js");
const multi_class_map_cjs_namespaceObject = require("../../directives/multi-class-map.cjs");
const checkbox_cjs_namespaceObject = require("../../images/checkbox.cjs");
var checkbox_cjs_default = /*#__PURE__*/ __webpack_require__.n(checkbox_cjs_namespaceObject);
require("./atomic-icon/atomic-icon.cjs");
const renderCheckbox = ({ props })=>{
    const partName = props.part ?? 'checkbox';
    const classNames = (0, multi_class_map_cjs_namespaceObject.tw)({
        'no-outline hover:border-primary-light focus-visible:border-primary-light grid h-4 w-4 place-items-center rounded': true,
        'selected bg-primary hover:bg-primary-light focus-visible:bg-primary-light': Boolean(props.checked),
        'border-neutral-dark border': !props.checked,
        [props.class ?? '']: Boolean(props.class)
    });
    const parts = [
        partName
    ];
    if (props.checked) parts.push(`${partName}-checked`);
    return (0, external_lit_namespaceObject.html)`
    <button
      .key=${props.key}
      id=${(0, if_defined_js_namespaceObject.ifDefined)(props.id)}
      class=${(0, multi_class_map_cjs_namespaceObject.multiClassMap)(classNames)}
      part=${parts.join(' ')}
      aria-checked=${(0, if_defined_js_namespaceObject.ifDefined)(props.checked)}
      aria-current=${(0, if_defined_js_namespaceObject.ifDefined)(props.ariaCurrent)}
      aria-label=${(0, if_defined_js_namespaceObject.ifDefined)(props.ariaLabel ?? props.text)}
      value=${(0, if_defined_js_namespaceObject.ifDefined)(props.text)}
      role="checkbox"
      @click=${()=>props.onToggle?.(!props.checked)}
      @mousedown=${(e)=>props.onMouseDown?.(e)}
      ${props.ref ? (0, ref_js_namespaceObject.ref)(props.ref) : ''}
    >
      <atomic-icon
        style="stroke: white"
        class="${props.checked ? 'block' : 'hidden'} w-3/5"
        .icon=${checkbox_cjs_default()}
        part=${(0, if_defined_js_namespaceObject.ifDefined)(props.iconPart)}
      ></atomic-icon>
    </button>
  `;
};
exports.renderCheckbox = __webpack_exports__.renderCheckbox;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "renderCheckbox"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
