"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckBox = void 0;
const tslib_1 = require("tslib");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
const react_1 = tslib_1.__importDefault(require("react"));
const warning_1 = require("../utils/warning");
require("./style.less");
const CheckIconSvg = () => (react_1.default.createElement("svg", { fill: 'currentColor', width: '1em', height: '1em', viewBox: '0 0 1024 1024', xmlns: 'http://www.w3.org/2000/svg' },
    react_1.default.createElement("path", { d: 'M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474c-6.1-7.7-15.3-12.2-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z' })));
const CheckBox = (_a) => {
    var { insertClass, className, label, size = 'default', disabled, checked, wrapTabIndex } = _a, restProps = tslib_1.__rest(_a, ["insertClass", "className", "label", "size", "disabled", "checked", "wrapTabIndex"]);
    (0, warning_1.warning)(!insertClass, '`insertClass` was deprecated, please use `className` instead');
    const checkboxProps = restProps;
    checkboxProps['checked'] = checked !== null && checked !== void 0 ? checked : false;
    return (react_1.default.createElement("label", { className: (0, classnames_1.default)('kt-checkbox', insertClass, className, {
            'kt-checkbox-large': size === 'large',
            'kt-checkbox-disabled': disabled,
        }), tabIndex: wrapTabIndex },
        react_1.default.createElement("span", { className: 'kt-checkbox-lump' },
            react_1.default.createElement("input", Object.assign({ type: 'checkbox', disabled: disabled }, checkboxProps)),
            react_1.default.createElement("span", { className: 'kt-checkbox-icon' },
                react_1.default.createElement(CheckIconSvg, null))),
        label || ' '));
};
exports.CheckBox = CheckBox;
exports.CheckBox.displayName = 'OpenSumiCheckBox';
//# sourceMappingURL=index.js.map