import styled, { css } from 'styled-components';
import { applyInputStyles } from '../Input/Input.mixins';
export var applyTextAreaCssProperties = function applyTextAreaCssProperties(param) {
    var height = param.height, width = param.width;
    var computedHeight = !Number.isNaN(Number(height)) ? "".concat(height, "rem") : height;
    var computedWidth = !Number.isNaN(Number(width)) ? "".concat(width, "rem") : width;
    return css([
        "--plasma-textarea-height:",
        ";--plasma-textarea-width:",
        ";"
    ], computedHeight, computedWidth);
};
/**
 * Base textarea.
 */ export var TextArea = styled.textarea.withConfig({
    displayName: "TextArea",
    componentId: "sc-c2e61f4e-0"
})([
    "",
    " ",
    " display:block;min-height:3.5rem;height:",
    ";width:",
    ";",
    ""
], applyInputStyles, applyTextAreaCssProperties, function(param) {
    var rows = param.rows;
    return rows ? 'unset' : 'var(--plasma-textarea-height, 9.375rem)';
}, function(param) {
    var cols = param.cols;
    return cols ? 'unset' : 'var(--plasma-textarea-width, 100%)';
}, function(param) {
    var resize = param.resize, cols = param.cols;
    return css([
        "",
        " ",
        ""
    ], resize && "resize: ".concat(resize, ";"), resize !== 'both' && resize !== 'horizontal' && !cols && 'min-width: var(--plasma-textarea-width, 100%); max-width: var(--plasma-textarea-width, 100%)');
});
