"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = __importDefault(require("react"));
var Icon_1 = __importDefault(require("../../../components/Icon"));
var styles_1 = __importStar(require("../../../utils/styles"));
var Container = styles_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  overflow: hidden;\n  box-sizing: border-box;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  cursor: pointer;\n  width: ", ";\n  height: ", ";\n  border-radius: ", ";\n  background: ", ";\n  border: ", ";\n"], ["\n  overflow: hidden;\n  box-sizing: border-box;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  cursor: pointer;\n  width: ", ";\n  height: ", ";\n  border-radius: ", ";\n  background: ", ";\n  border: ", ";\n"])), function (_a) {
    var $type = _a.$type;
    return ($type === 'default' ? '24px' : '32px');
}, function (_a) {
    var $type = _a.$type;
    return ($type === 'default' ? '24px' : '32px');
}, function (_a) {
    var $type = _a.$type;
    return ($type === 'default' ? '6px' : '8px');
}, function (_a) {
    var $value = _a.$value;
    return !!$value ? styles_1.theme.color.primary.default : 'none';
}, function (_a) {
    var $type = _a.$type, $value = _a.$value;
    return "".concat($type === 'default' ? '1px' : '3px', " solid ").concat(!!$value
        ? styles_1.theme.color.primary.default
        : $type === 'default'
            ? styles_1.theme.color.gray[500]
            : styles_1.theme.color.extra.white);
});
exports.default = (function (_a) {
    var _b = _a.type, type = _b === void 0 ? 'default' : _b, _c = _a.value, value = _c === void 0 ? false : _c, onChangeValue = _a.onChangeValue;
    var onClick = react_1.default.useCallback(function (event) {
        event === null || event === void 0 ? void 0 : event.preventDefault();
        onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(!value);
    }, [value, onChangeValue]);
    return ((0, jsx_runtime_1.jsx)(Container, { "$type": type, "$value": value, onClick: onClick, children: !!value && ((0, jsx_runtime_1.jsx)(Icon_1.default, { type: "check", size: "100%", fill: styles_1.theme.color.extra.white })) }));
});
var templateObject_1;
//# sourceMappingURL=index.js.map