(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", "../../../Pallette/themes", "../../theme", "../../../utils/theme/getTheme"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.PointButton = exports.ColorLine = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var themes_1 = require("../../../Pallette/themes");
    var theme_1 = require("../../theme");
    var getTheme_1 = require("../../../utils/theme/getTheme");
    var COMPONENT_NAME = "colorPicker";
    exports.ColorLine = 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  width: 100%;\n  min-width: 212px;\n  min-height: 8px;\n  background: linear-gradient(\n    to right,\n    #f00 0%,\n    #ff0 17%,\n    #0f0 33%,\n    #0ff 50%,\n    #00f 67%,\n    #f0f 83%,\n    #f00 100%\n  );\n  border-radius: 8px;\n  position: relative;\n\n  & > button {\n    position: absolute;\n    width: 8px;\n    height: 16px;\n    border-radius: 8px;\n    border: 2px solid\n      ", ";\n    ", ";\n    top: -3.6px;\n    cursor: pointer;\n  }\n"], ["\n  width: 100%;\n  min-width: 212px;\n  min-height: 8px;\n  background: linear-gradient(\n    to right,\n    #f00 0%,\n    #ff0 17%,\n    #0f0 33%,\n    #0ff 50%,\n    #00f 67%,\n    #f0f 83%,\n    #f00 100%\n  );\n  border-radius: 8px;\n  position: relative;\n\n  & > button {\n    position: absolute;\n    width: 8px;\n    height: 16px;\n    border-radius: 8px;\n    border: 2px solid\n      ", ";\n    ", ";\n    top: -3.6px;\n    cursor: pointer;\n  }\n"])), 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 hue = _a.hue, left = _a.left;
        return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n    left: calc(", "% - 4px);\n    background: hsl(", ", 100%, 50%);\n  "], ["\n    left: calc(", "% - 4px);\n    background: hsl(", ", 100%, 50%);\n  "])), left / 360, hue);
    });
    exports.ColorLine.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    var templateObject_1, templateObject_2, templateObject_3;
});
