(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "styled-components", "../../../utils/theme/getTheme", "../../../Pallette/themes", "../../theme"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.SaturationActiveBlock = exports.PointButton = exports.Saturation = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var getTheme_1 = require("../../../utils/theme/getTheme");
    var themes_1 = require("../../../Pallette/themes");
    var theme_1 = require("../../theme");
    var COMPONENT_NAME = "colorPicker";
    exports.Saturation = styled_components_1.default.div.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            theme: props.theme,
            defaultTheme: theme_1.defaultThemeColorPicker,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n  position: relative;\n  width: 100%;\n  min-width: 212px;\n  padding: 5px;\n  height: 100%;\n  min-height: 100px;\n  border-radius: 8px;\n  background-color: ", ";\n  background-image: linear-gradient(0deg, #000000, transparent),\n    linear-gradient(90deg, #ffffff, hsla(0, 0%, 100%, 0));\n\n  & button {\n    position: absolute;\n    width: 11.56px;\n    height: 11.56px;\n    opacity: 1;\n    border: 2px solid\n      ", ";\n    border-radius: 50%;\n    cursor: pointer;\n    ", ";\n  }\n"], ["\n  position: relative;\n  width: 100%;\n  min-width: 212px;\n  padding: 5px;\n  height: 100%;\n  min-height: 100px;\n  border-radius: 8px;\n  background-color: ", ";\n  background-image: linear-gradient(0deg, #000000, transparent),\n    linear-gradient(90deg, #ffffff, hsla(0, 0%, 100%, 0));\n\n  & button {\n    position: absolute;\n    width: 11.56px;\n    height: 11.56px;\n    opacity: 1;\n    border: 2px solid\n      ", ";\n    border-radius: 50%;\n    cursor: pointer;\n    ", ";\n  }\n"])), function (_a) {
        var hue = _a.hue;
        return "hsl(" + hue + ", 100%, 50%)";
    }, function (_a) {
        var theme = _a.theme;
        return theme.components.colorPicker.borderButton;
    }, function (_a) {
        var theme = _a.theme;
        return theme.shadows.tp.bottom;
    });
    exports.PointButton = styled_components_1.default.button(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n  ", "\n"], ["\n  ", "\n"])), function (_a) {
        var hex = _a.hex, left = _a.left, top = _a.top;
        return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n    background: ", ";\n    left: calc(", "% - 5px);\n    top: calc(", "% - 5px);\n  "], ["\n    background: ", ";\n    left: calc(", "% - 5px);\n    top: calc(", "% - 5px);\n  "])), hex, left * 100, -(top * 100) + 100);
    });
    exports.SaturationActiveBlock = styled_components_1.default.div(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n  width: 100%;\n  height: 100%;\n  position: relative;\n"], ["\n  width: 100%;\n  height: 100%;\n  position: relative;\n"])));
    exports.Saturation.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
});
