(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", "../typography/P1", "../Pallette/Shape", "./themes", "./helpers"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.LabelStyled = 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 P1_1 = (0, tslib_1.__importDefault)(require("../typography/P1"));
    var Shape_1 = require("../Pallette/Shape");
    var themes_2 = require("./themes");
    var helpers_1 = require("./helpers");
    var COMPONENT_NAME = "label";
    exports.LabelStyled = (0, styled_components_1.default)(P1_1.default).attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            theme: props.theme,
            defaultTheme: themes_2.defaultThemeLabel,
            componentName: COMPONENT_NAME
        })
    }); })(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n  color: ", ";\n  ", ";\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  border-radius: ", ";\n  padding: 4px;\n  ", "\n\n  & > .required-container {\n    color: ", ";\n  }\n\n  .label-icon {\n    color: unset;\n  }\n"], ["\n  color: ", ";\n  ", ";\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  border-radius: ", ";\n  padding: 4px;\n  ", "\n\n  & > .required-container {\n    color: ", ";\n  }\n\n  .label-icon {\n    color: unset;\n  }\n"])), function (_a) {
        var status = _a.status, theme = _a.theme, isDisabled = _a.isDisabled;
        return (0, helpers_1.getComputedLabelColor)(status, theme, isDisabled);
    }, function (_a) {
        var theme = _a.theme, status = _a.status, isDisabled = _a.isDisabled;
        return (isDisabled || status === "filled") && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n      background: ", ";\n    "], ["\n      background: ", ";\n    "])), theme.components[COMPONENT_NAME]
            .backgroundDisabledOrFilled);
    }, Shape_1.Shape.borderRadiusSmall, function (_a) {
        var size = _a.size;
        if (size === "s") {
            return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n        font-size: 12px;\n      "], ["\n        font-size: 12px;\n      "])));
        }
        else {
            return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n        font-size: 14px;\n      "], ["\n        font-size: 14px;\n      "])));
        }
    }, function (_a) {
        var theme = _a.theme, isDisabled = _a.isDisabled;
        return isDisabled
            ? theme.components[COMPONENT_NAME].colorDisabled
            : theme.components[COMPONENT_NAME].colorError;
    });
    exports.LabelStyled.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
});
