"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 __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var styled_components_1 = __importDefault(require("styled-components"));
var styleConstants_1 = require("../styleConstants");
var Slider = styled_components_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  position: absolute;\n  cursor: pointer;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  border-radius: 34px;\n  transition: 0.4s;\n  &:before {\n    position: absolute;\n    content: \"\";\n    height: 10px;\n    width: 10px;\n    left: 1.7px;\n    top: 1.7px;\n    transition: 0.4s;\n    border-radius: 50%;\n  }\n"], ["\n  position: absolute;\n  cursor: pointer;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  border-radius: 34px;\n  transition: 0.4s;\n  &:before {\n    position: absolute;\n    content: \"\";\n    height: 10px;\n    width: 10px;\n    left: 1.7px;\n    top: 1.7px;\n    transition: 0.4s;\n    border-radius: 50%;\n  }\n"])));
Slider.defaultProps = {
    theme: {
        checkboxInactiveColor: styleConstants_1.colors.accent.CIVIL_GRAY_2,
        checkboxActiveColor: styleConstants_1.colors.accent.CIVIL_BLUE,
    },
};
var Switch = styled_components_1.default.label(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n  box-sizing: content-box;\n  position: relative;\n  display: inline-block;\n  width: 32px;\n  height: 19px;\n  input {\n    display: none;\n  }\n  input + ", " {\n    background-color: transparent;\n    border: 2px solid ", ";\n  }\n  input + ", ":before {\n    background-color: ", ";\n  }\n  input:checked + ", " {\n    border: 2px solid ", ";\n    background-color: ", ";\n  }\n  input:focus + ", " {\n    box-shadow: 0 0 1px #2196f3;\n  }\n  input:checked + ", ":before {\n    background-color: ", ";\n    transform: translateX(12px);\n  }\n"], ["\n  box-sizing: content-box;\n  position: relative;\n  display: inline-block;\n  width: 32px;\n  height: 19px;\n  input {\n    display: none;\n  }\n  input + ", " {\n    background-color: transparent;\n    border: 2px solid ", ";\n  }\n  input + ", ":before {\n    background-color: ", ";\n  }\n  input:checked + ", " {\n    border: 2px solid ", ";\n    background-color: ", ";\n  }\n  input:focus + ", " {\n    box-shadow: 0 0 1px #2196f3;\n  }\n  input:checked + ", ":before {\n    background-color: ", ";\n    transform: translateX(12px);\n  }\n"])), Slider, function (props) { return props.theme.checkboxInactiveColor; }, Slider, function (props) { return props.theme.checkboxInactiveColor; }, Slider, function (props) { return props.theme.checkboxActiveColor; }, function (props) { return props.theme.checkboxActiveColor; }, Slider, Slider, styleConstants_1.colors.basic.WHITE);
Switch.defaultProps = {
    theme: {
        checkboxInactiveColor: styleConstants_1.colors.accent.CIVIL_GRAY_2,
        checkboxActiveColor: styleConstants_1.colors.accent.CIVIL_BLUE,
    },
};
exports.SlideCheckbox = function (props) {
    return (React.createElement(Switch, null,
        React.createElement("input", { onChange: function () {
                if (!props.locked) {
                    props.onClick();
                }
            }, checked: props.checked, type: "checkbox" }),
        React.createElement(Slider, null)));
};
var templateObject_1, templateObject_2;
//# sourceMappingURL=SlideCheckbox.js.map