"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),j=require("./assets/checkbox-error.svg.cjs.js"),r=require("../../utils/cn/cn.cjs.js"),e=require("../../src/components/Checkbox/checkbox.module.css"),t=require("../Typography/Typography.cjs.js"),l=require("../Icon/Icon.cjs.js"),i=require("../Icon/constants.cjs.js"),I=({label:m,checkboxSize:u="lg",checkboxVariant:x="default",isError:n=!1,errorText:o,disabled:a,checked:s,className:d,inverted:h,...b})=>{const p=N=>{switch(N){case"default":return c.jsx(l.Icon,{name:i.EIconName.CHECK,className:e.icon});case"undetermined":return c.jsx(l.Icon,{name:i.EIconName.REMOVE,className:e.icon})}},y=r.cn(d,e.root,{[e.error]:n,[e.disabled]:a,[e.inverted]:h});return c.jsxs("label",{className:y,children:[c.jsx("input",{...b,type:"checkbox",disabled:a,checked:s,className:e.checkbox}),c.jsx("div",{className:r.cn(e.visibleCustomCheckbox,e[u]),"data-checked":s,children:s&&p(x)}),c.jsx(t.Typography,{defaultVariant:"labelSm",className:e.label,children:m}),n&&!!o&&c.jsxs("div",{className:e.errorTextContainer,children:[c.jsx(j.default,{className:e.errorIcon}),c.jsx(t.Typography,{defaultVariant:"labelSm",className:e.errorText,children:o})]})]})};exports.Checkbox=I;
