"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get Divider () {
        return Divider;
    },
    get DividerWrapper () {
        return DividerWrapper;
    },
    get Hint () {
        return Hint;
    },
    get HintIconWrapper () {
        return HintIconWrapper;
    },
    get HintTargetWrapper () {
        return HintTargetWrapper;
    },
    get OuterLabelWrapper () {
        return OuterLabelWrapper;
    },
    get StyledContainer () {
        return StyledContainer;
    },
    get StyledContent () {
        return StyledContent;
    },
    get StyledContentWrapper () {
        return StyledContentWrapper;
    },
    get StyledHeaderSlot () {
        return StyledHeaderSlot;
    },
    get StyledHelpers () {
        return StyledHelpers;
    },
    get StyledHiddenTextArea () {
        return StyledHiddenTextArea;
    },
    get StyledHintWrapper () {
        return StyledHintWrapper;
    },
    get StyledIndicator () {
        return StyledIndicator;
    },
    get StyledIndicatorWrapper () {
        return StyledIndicatorWrapper;
    },
    get StyledLabel () {
        return StyledLabel;
    },
    get StyledLeftHelper () {
        return StyledLeftHelper;
    },
    get StyledOptionalText () {
        return StyledOptionalText;
    },
    get StyledOutsideHelpersWrapper () {
        return StyledOutsideHelpersWrapper;
    },
    get StyledPlaceholder () {
        return StyledPlaceholder;
    },
    get StyledRightHelper () {
        return StyledRightHelper;
    },
    get StyledTextArea () {
        return StyledTextArea;
    },
    get StyledTextAreaWrapper () {
        return StyledTextAreaWrapper;
    },
    get TitleCaption () {
        return TitleCaption;
    }
});
var _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
var _mixins = require("../../mixins");
var _Tooltip = require("../Tooltip");
var _engines = require("../../engines");
var _TextAreatokens = require("./TextArea.tokens");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
var mergedConfig = (0, _engines.mergeConfig)(_Tooltip.tooltipConfig);
var Tooltip = (0, _engines.component)(mergedConfig);
var Hint = (0, _styledcomponents.default)(Tooltip).withConfig({
    displayName: "TextArea.styles__Hint",
    componentId: "sc-8fa014a4-0"
})([
    ""
]);
var OuterLabelWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__OuterLabelWrapper",
    componentId: "sc-8fa014a4-1"
})([
    "display:flex;align-items:center;max-width:",
    ";margin-bottom:",
    ";"
], function(param) {
    var width = param.width;
    return width;
}, function(param) {
    var isInnerLabel = param.isInnerLabel;
    return isInnerLabel ? "var(".concat(_TextAreatokens.tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(_TextAreatokens.tokens.labelMarginBottom, ")");
});
var StyledLabel = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledLabel",
    componentId: "sc-8fa014a4-2"
})([
    "position:relative;display:inline-flex;color:var(",
    ",var(",
    "));font-family:var(",
    ",var(",
    "));font-size:var(",
    ",var(",
    "));font-style:var(",
    ",var(",
    "));font-weight:var(",
    ",var(",
    "));letter-spacing:var(",
    ",var(",
    "));line-height:var(",
    ",var(",
    "));"
], _TextAreatokens.tokens.labelOuterColor, _TextAreatokens.tokens.inputColor, _TextAreatokens.tokens.labelOuterFontFamily, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.labelOuterFontSize, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.labelOuterFontStyle, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.labelOuterFontWeight, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.labelOuterLetterSpacing, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.labelOuterLineHeight, _TextAreatokens.tokens.inputLineHeight);
var TitleCaption = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__TitleCaption",
    componentId: "sc-8fa014a4-3"
})([
    "display:inline-block;margin-left:auto;font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");"
], _TextAreatokens.tokens.titleCaptionFontFamily, _TextAreatokens.tokens.titleCaptionFontSize, _TextAreatokens.tokens.titleCaptionFontStyle, _TextAreatokens.tokens.titleCaptionFontWeight, _TextAreatokens.tokens.titleCaptionLetterSpacing, _TextAreatokens.tokens.titleCaptionLineHeight);
var StyledIndicatorWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledIndicatorWrapper",
    componentId: "sc-8fa014a4-4"
})([
    "position:relative;display:inline-flex;align-items:center;"
]);
var StyledOptionalText = _styledcomponents.default.span.withConfig({
    displayName: "TextArea.styles__StyledOptionalText",
    componentId: "sc-8fa014a4-5"
})([
    "color:var(",
    ");font-family:",
    ";font-size:",
    ";font-style:",
    ";font-weight:",
    ";letter-spacing:",
    ";line-height:",
    ";"
], _TextAreatokens.tokens.optionalColor, function(param) {
    var inheritFont = param.inheritFont;
    return inheritFont ? 'inherit' : "var(".concat(_TextAreatokens.tokens.labelOuterFontFamily, ", var(").concat(_TextAreatokens.tokens.inputFontFamily, "))");
}, function(param) {
    var inheritFont = param.inheritFont;
    return inheritFont ? 'inherit' : "var(".concat(_TextAreatokens.tokens.labelOuterFontSize, ", var(").concat(_TextAreatokens.tokens.inputFontSize, "))");
}, function(param) {
    var inheritFont = param.inheritFont;
    return inheritFont ? 'inherit' : "var(".concat(_TextAreatokens.tokens.labelOuterFontStyle, ", var(").concat(_TextAreatokens.tokens.inputFontStyle, "))");
}, function(param) {
    var inheritFont = param.inheritFont;
    return inheritFont ? 'inherit' : "var(".concat(_TextAreatokens.tokens.labelOuterFontWeight, ", var(").concat(_TextAreatokens.tokens.inputFontWeight, "))");
}, function(param) {
    var inheritFont = param.inheritFont;
    return inheritFont ? 'inherit' : "var(".concat(_TextAreatokens.tokens.labelOuterLetterSpacing, ", var(").concat(_TextAreatokens.tokens.inputLetterSpacing, "))");
}, function(param) {
    var inheritFont = param.inheritFont;
    return inheritFont ? 'inherit' : "var(".concat(_TextAreatokens.tokens.labelOuterLineHeight, ", var(").concat(_TextAreatokens.tokens.inputLineHeight, "))");
});
var StyledHintWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledHintWrapper",
    componentId: "sc-8fa014a4-6"
})([
    "display:inline-flex;line-height:0;margin:var(",
    ");&.",
    "{position:absolute;margin:0;inset:var(",
    ");}"
], _TextAreatokens.tokens.hintMargin, _TextAreatokens.classes.innerLabelPlacement, _TextAreatokens.tokens.hintInnerLabelPlacementOffset);
var HintTargetWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__HintTargetWrapper",
    componentId: "sc-8fa014a4-7"
})([
    "color:var(",
    ");width:var(",
    ");height:var(",
    ");display:flex;justify-content:center;align-items:center;"
], _TextAreatokens.tokens.hintIconColor, _TextAreatokens.tokens.hintTargetSize, _TextAreatokens.tokens.hintTargetSize);
var HintIconWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__HintIconWrapper",
    componentId: "sc-8fa014a4-8"
})([
    ""
]);
var StyledTextAreaWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledTextAreaWrapper",
    componentId: "sc-8fa014a4-9"
})([
    "display:flex;flex-direction:column;background-color:var(",
    ");padding-top:",
    ";padding-bottom:",
    ";border-radius:",
    ";&:after{content:'';position:absolute;z-index:-2;inset:0;}"
], _TextAreatokens.tokens.inputBackgroundColor, function(param) {
    var hasHeader = param.hasHeader;
    return hasHeader ? 'unset' : "var(".concat(_TextAreatokens.tokens.inputPaddingTop, ")");
}, function(param) {
    var hasHelper = param.hasHelper;
    return hasHelper ? "var(".concat(_TextAreatokens.tokens.inputPaddingBottomWithHelpers, ")") : "var(".concat(_TextAreatokens.tokens.inputPaddingBottom, ")");
}, function(param) {
    var hasHelper = param.hasHelper;
    return hasHelper ? "var(".concat(_TextAreatokens.tokens.borderRadiusWithHelpers, ")") : "var(".concat(_TextAreatokens.tokens.borderRadius, ")");
});
var StyledContentWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledContentWrapper",
    componentId: "sc-8fa014a4-10"
})([
    "position:relative;width:100%;height:0;padding-top:",
    ";"
], function(param) {
    var hasHeader = param.hasHeader;
    return hasHeader ? "var(".concat(_TextAreatokens.tokens.inputPaddingTop, ")") : 'unset';
});
var StyledContent = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledContent",
    componentId: "sc-8fa014a4-11"
})([
    "position:absolute;display:flex;align-items:center;z-index:1;color:var(",
    ");top:",
    ";right:var(",
    ");height:var(",
    ");&:hover{color:var(",
    ");}&:active{color:var(",
    ");}"
], _TextAreatokens.tokens.rightContentColor, function(param) {
    var hasHeader = param.hasHeader;
    return hasHeader ? "var(".concat(_TextAreatokens.tokens.inputPaddingTop, ")") : "var(".concat(_TextAreatokens.tokens.rightContentTop, ")");
}, _TextAreatokens.tokens.rightContentRight, _TextAreatokens.tokens.rightContentHeight, _TextAreatokens.tokens.rightContentColorHover, _TextAreatokens.tokens.rightContentColorActive);
var StyledHeaderSlot = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledHeaderSlot",
    componentId: "sc-8fa014a4-12"
})([
    "display:flex;flex-direction:column;"
]);
var DividerWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__DividerWrapper",
    componentId: "sc-8fa014a4-13"
})([
    "background:var(",
    ");"
], _TextAreatokens.tokens.backgroundColor);
var Divider = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__Divider",
    componentId: "sc-8fa014a4-14"
})([
    "height:0.0625rem;background:var(",
    ");"
], _TextAreatokens.tokens.dividerColor);
var StyledContainer = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledContainer",
    componentId: "sc-8fa014a4-15"
})([
    "display:inline-flex;flex-direction:column;width:",
    ";position:relative;"
], function(param) {
    var width = param.width;
    return width;
});
var StyledTextArea = _styledcomponents.default.textarea.withConfig({
    displayName: "TextArea.styles__StyledTextArea",
    componentId: "sc-8fa014a4-16"
})([
    "display:block;box-sizing:border-box;outline:none;border:none;-webkit-appearance:none;background-color:transparent;color:var(",
    ");caret-color:var(",
    ");resize:",
    ";--plasma_private-textarea-height:",
    ";--plasma_private-textarea-width:",
    ";--plasma_private-textarea-computed-height:",
    ";--plasma_private-textarea-computed-width:",
    ";height:var(--plasma_private-textarea-computed-height);width:var(--plasma_private-textarea-computed-width);min-width:",
    ";max-width:",
    ";min-height:var(",
    ");padding-right:",
    ";padding-left:var(",
    ",0);padding-top:0;padding-bottom:0;--plasma_private-textarea-helpers-computed-height:calc( var(",
    ",0) + var(",
    ",0) + var(",
    ") );--plasma_private-textarea-input-with-helpers-height:calc( var(--plasma_private-textarea-height) - var(--plasma_private-textarea-helpers-computed-height) + var(",
    ") );--plasma_private-textarea-input-without-helpers-height:calc( var(--plasma_private-textarea-computed-height) - var(",
    ") );--plasma_private-textarea-input-actual-height:",
    ";height:var(--plasma_private-textarea-input-actual-height);font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");&::placeholder{opacity:0;}&:read-only{cursor:default;}&:focus:not(:disabled){color:var(",
    ");}&::-webkit-scrollbar{width:var(",
    ");}&::-webkit-scrollbar-thumb{background-color:var(",
    ");background-clip:content-box;border:var(",
    ") solid transparent;border-radius:1rem;}&::-webkit-scrollbar-track{background-color:var(",
    ");background-clip:content-box;border:var(",
    ") solid transparent;border-radius:1rem;}"
], _TextAreatokens.tokens.inputColor, _TextAreatokens.tokens.inputCaretColor, function(param) {
    var resize = param.resize;
    return resize || 'none';
}, function(param) {
    var height = param.height;
    return !Number.isNaN(Number(height)) ? "calc(".concat(height, "rem - 0.875rem)") : height || "var(".concat(_TextAreatokens.tokens.inputHeight, ")");
}, function(param) {
    var width = param.width;
    return !Number.isNaN(Number(width)) ? "".concat(width, "rem") : width || "var(".concat(_TextAreatokens.tokens.inputWidth, ")");
}, function(param) {
    var rows = param.rows;
    return rows ? 'unset' : 'var(--plasma_private-textarea-height)';
}, function(param) {
    var cols = param.cols;
    return cols ? 'unset' : 'var(--plasma_private-textarea-width)';
}, function(param) {
    var applyCustomWidth = param.applyCustomWidth;
    return applyCustomWidth ? 'var(--plasma_private-textarea-width)' : 'auto';
}, function(param) {
    var applyCustomWidth = param.applyCustomWidth;
    return applyCustomWidth ? 'var(--plasma_private-textarea-width)' : 'auto';
}, _TextAreatokens.tokens.inputMinHeight, function(param) {
    var hasContentRight = param.hasContentRight;
    return hasContentRight ? "var(".concat(_TextAreatokens.tokens.inputPaddingRightWithRightContent, ", 0)") : "var(".concat(_TextAreatokens.tokens.inputPaddingRight, ", 0)");
}, _TextAreatokens.tokens.inputPaddingLeft, _TextAreatokens.tokens.helpersPaddingTop, _TextAreatokens.tokens.helpersPaddingBottom, _TextAreatokens.tokens.helpersLineHeight, _TextAreatokens.tokens.helpersOffset, _TextAreatokens.tokens.inputPaddingBottom, function(param) {
    var hasHelper = param.hasHelper, rows = param.rows;
    return hasHelper && !rows ? 'var(--plasma_private-textarea-input-with-helpers-height)' : 'var(--plasma_private-textarea-input-without-helpers-height)';
}, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.inputLineHeight, _TextAreatokens.tokens.inputColorFocus, _TextAreatokens.tokens.scrollbarWidth, _TextAreatokens.tokens.scrollbarThumbBackgroundColor, _TextAreatokens.tokens.scrollbarBorderWidth, _TextAreatokens.tokens.scrollbarTrackBackgroundColor, _TextAreatokens.tokens.scrollbarBorderWidth);
var StyledHiddenTextArea = _styledcomponents.default.textarea.withConfig({
    displayName: "TextArea.styles__StyledHiddenTextArea",
    componentId: "sc-8fa014a4-17"
})([
    "max-height:none !important;min-height:var(",
    ") !important;visibility:hidden !important;overflow:hidden !important;position:absolute !important;z-index:-1000 !important;top:0 !important;left:0 !important;right:",
    ";border-width:0;padding-right:",
    ";padding-left:var(",
    ",0);padding-top:0;padding-bottom:0;box-sizing:border-box;text-indent:0;text-rendering:auto;text-transform:none;tab-size:8;font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");"
], _TextAreatokens.tokens.inputMinHeight, function(param) {
    var cols = param.cols;
    return cols ? 'unset' : '0.0625rem !important';
}, function(param) {
    var hasContentRight = param.hasContentRight;
    return hasContentRight ? "var(".concat(_TextAreatokens.tokens.inputPaddingRightWithRightContent, ", 0)") : "var(".concat(_TextAreatokens.tokens.inputPaddingRight, ", 0)");
}, _TextAreatokens.tokens.inputPaddingLeft, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.inputLineHeight);
var StyledHelpers = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledHelpers",
    componentId: "sc-8fa014a4-18"
})([
    "box-sizing:border-box;display:flex;justify-content:space-between;transition:background-color 0.1s ease-in-out;background-color:var(",
    ");padding-top:var(",
    ");padding-right:var(",
    ");padding-bottom:var(",
    ");padding-left:var(",
    ");border-bottom-left-radius:var(",
    ");border-bottom-right-radius:var(",
    ");"
], _TextAreatokens.tokens.helpersBackgroundColor, _TextAreatokens.tokens.helpersPaddingTop, _TextAreatokens.tokens.helpersPaddingRight, _TextAreatokens.tokens.helpersPaddingBottom, _TextAreatokens.tokens.helpersPaddingLeft, _TextAreatokens.tokens.borderRadius, _TextAreatokens.tokens.borderRadius);
var StyledOutsideHelpersWrapper = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledOutsideHelpersWrapper",
    componentId: "sc-8fa014a4-19"
})([
    "box-sizing:border-box;display:flex;justify-content:space-between;padding-top:var(",
    ");"
], _TextAreatokens.tokens.clearHelpersPaddingTop);
var StyledLeftHelper = _styledcomponents.default.span.withConfig({
    displayName: "TextArea.styles__StyledLeftHelper",
    componentId: "sc-8fa014a4-20"
})([
    "",
    ";display:block;font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");color:var(",
    ");&.",
    "{color:var(",
    ",var(",
    "));}"
], (0, _mixins.applyEllipsis)(), _TextAreatokens.tokens.helpersFontFamily, _TextAreatokens.tokens.helpersFontSize, _TextAreatokens.tokens.helpersFontStyle, _TextAreatokens.tokens.helpersFontWeight, _TextAreatokens.tokens.helpersLetterSpacing, _TextAreatokens.tokens.helpersLineHeight, _TextAreatokens.tokens.leftHelperColor, _TextAreatokens.classes.leftHelperFocus, _TextAreatokens.tokens.leftHelperColorFocus, _TextAreatokens.tokens.leftHelperColor);
var StyledRightHelper = (0, _styledcomponents.default)(StyledLeftHelper).withConfig({
    displayName: "TextArea.styles__StyledRightHelper",
    componentId: "sc-8fa014a4-21"
})([
    "color:var(",
    ");margin-left:auto;"
], _TextAreatokens.tokens.rightHelperColor);
var StyledPlaceholder = _styledcomponents.default.label.withConfig({
    displayName: "TextArea.styles__StyledPlaceholder",
    componentId: "sc-8fa014a4-22"
})([
    "box-sizing:border-box;position:absolute;pointer-events:none;display:inline-flex;align-items:center;transition:all 0.1s ease-in-out;transform-origin:top left;color:var(",
    ");width:100%;height:auto;top:var(",
    ");padding-left:var(",
    ");padding-right:",
    ";font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");"
], _TextAreatokens.tokens.placeholderColor, _TextAreatokens.tokens.inputPaddingTop, _TextAreatokens.tokens.inputPaddingLeft, function(param) {
    var hasContentRight = param.hasContentRight;
    return hasContentRight ? "var(".concat(_TextAreatokens.tokens.inputPaddingRightWithRightContent, ")") : "var(".concat(_TextAreatokens.tokens.inputPaddingRight, ")");
}, _TextAreatokens.tokens.inputFontFamily, _TextAreatokens.tokens.inputFontSize, _TextAreatokens.tokens.inputFontStyle, _TextAreatokens.tokens.inputFontWeight, _TextAreatokens.tokens.inputLetterSpacing, _TextAreatokens.tokens.inputLineHeight);
var StyledIndicator = _styledcomponents.default.div.withConfig({
    displayName: "TextArea.styles__StyledIndicator",
    componentId: "sc-8fa014a4-23"
})([
    "position:absolute;border-radius:50%;background-color:var(",
    ");&.",
    "{width:var(",
    ");height:var(",
    ");inset:var(",
    ");&.",
    "{inset:var(",
    ");&.",
    "{right:calc( -1 * var(",
    ") + var(",
    ",0px) );}}}&.",
    "{width:var(",
    ");height:var(",
    ");inset:var(",
    ");&.",
    "{inset:var(",
    ");}}"
], _TextAreatokens.tokens.indicatorColor, _TextAreatokens.classes.outerLabelPlacement, _TextAreatokens.tokens.indicatorSizeOuter, _TextAreatokens.tokens.indicatorSizeOuter, _TextAreatokens.tokens.indicatorLabelPlacementOuter, _TextAreatokens.classes.requiredAlignRight, _TextAreatokens.tokens.indicatorLabelPlacementOuterRight, _TextAreatokens.classes.hasHint, _TextAreatokens.tokens.indicatorSizeOuter, _TextAreatokens.tokens.indicatorLabelPlacementHintOuterRight, _TextAreatokens.classes.innerLabelPlacement, _TextAreatokens.tokens.indicatorSizeInner, _TextAreatokens.tokens.indicatorSizeInner, _TextAreatokens.tokens.indicatorLabelPlacementInner, _TextAreatokens.classes.requiredAlignRight, _TextAreatokens.tokens.indicatorLabelPlacementInnerRight);
