import styled from "@emotion/styled";
import { applyEllipsis } from "../../mixins";
import { component, mergeConfig } from "../../engines";
import { tooltipConfig } from "../Tooltip";
import { popoverClasses } from "../Popover";
import { classes, tokens } from "./TextField.tokens";
var mergedConfig = mergeConfig(tooltipConfig);
var Tooltip = component(mergedConfig);
export var InputWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y0",
    label: "InputWrapper"
})("position:relative;display:flex;align-items:center;box-sizing:border-box;&:after{content:'';position:absolute;z-index:-2;inset:0;}");
export var InputLabelWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y1",
    label: "InputLabelWrapper"
})("flex:1;overflow:scroll;position:relative;width:100%;display:inline-flex;align-items:center;::-webkit-scrollbar{display:none;}scrollbar-width:none;overscroll-behavior:contain;&.", String(classes.hasChips), "{height:var(", tokens.chipHeight, ");border-radius:var(", tokens.chipBorderRadius, ");}");
export var StyledChips = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y2",
    label: "StyledChips"
})("display:flex;gap:var(", tokens.chipGap, ");margin-right:var(", tokens.chipMarginRight, ",var(", tokens.chipGap, "));user-select:none;");
export var Input = /*#__PURE__*/ styled("input", {
    target: "e1h3xb1y3",
    label: "Input"
})("box-sizing:border-box;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:100%;z-index:1;&.", classes.inputTextEllipsis, "{", applyEllipsis(), "}&::placeholder{opacity:0;}");
export var InputContainer = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y4",
    label: "InputContainer"
})("position:relative;display:flex;flex:1;min-width:", function(param) {
    var hasDynamicWidth = param.hasDynamicWidth;
    return hasDynamicWidth ? 'auto' : '60%';
}, ";", Input, "{max-width:", function(param) {
    var hasDynamicWidth = param.hasDynamicWidth;
    return hasDynamicWidth ? '100%' : 'none';
}, ";}");
export var InputPlaceholder = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y5",
    label: "InputPlaceholder"
})("display:flex;position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", tokens.placeholderColor, ");padding:", function(param) {
    var hasPadding = param.hasPadding;
    return hasPadding ? "var(".concat(tokens.contentLabelInnerPadding, ")") : '0';
}, ";");
export var InputPlaceholderValue = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y6",
    label: "InputPlaceholderValue"
})("&.", classes.inputTextEllipsis, "{", applyEllipsis(), "}");
export var OuterLabelWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y7",
    label: "OuterLabelWrapper"
})("display:flex;align-items:center;margin-bottom:", function(param) {
    var isInnerLabel = param.isInnerLabel;
    return isInnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
}, ";padding:", function(param) {
    var isInnerLabel = param.isInnerLabel;
    return isInnerLabel ? 0 : "var(".concat(tokens.labelPadding, ", 0)");
}, ";white-space:", function(param) {
    var isInnerLabel = param.isInnerLabel;
    return isInnerLabel ? 'nowrap' : 'normal';
}, ";");
export var TitleCaption = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y8",
    label: "TitleCaption"
})("display:inline-block;margin-left:auto;");
export var StyledIndicatorWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y9",
    label: "StyledIndicatorWrapper"
})("position:relative;display:inline-flex;align-items:center;");
export var Label = /*#__PURE__*/ styled("label", {
    target: "e1h3xb1y10",
    label: "Label"
})("display:inline-flex;");
export var StyledContentLeft = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y11",
    label: "StyledContentLeft"
})("margin:var(", tokens.leftContentMargin, ");color:var(", tokens.contentSlotColor, ");line-height:0;&:hover{color:var(", tokens.contentSlotColorHover, ",var(", tokens.contentSlotColor, "));}&:active{color:var(", tokens.contentSlotColorActive, ",var(", tokens.contentSlotColor, "));}");
export var StyledContentRightWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y12",
    label: "StyledContentRightWrapper"
})("display:flex;align-items:center;");
export var StyledContentRight = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y13",
    label: "StyledContentRight"
})("line-height:0;margin:var(", tokens.rightContentMargin, ");color:var(", tokens.contentSlotRightColor, ",var(", tokens.contentSlotColor, "));&:hover{color:var(", tokens.contentSlotRightColorHover, ",var(", tokens.contentSlotColorHover, "));cursor:pointer;}&:active{color:var(", tokens.contentSlotRightColorActive, ",var(", tokens.contentSlotColorActive, "));}");
export var LeftHelper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y14",
    label: "LeftHelper"
})("color:var(", tokens.leftHelperColor, ");&.", classes.hasFocus, "{color:var(", tokens.leftHelperColorFocus, ",var(", tokens.leftHelperColor, "));}");
export var StyledTextBefore = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y15",
    label: "StyledTextBefore"
})("visibility:", function(param) {
    var isHidden = param.isHidden;
    return isHidden ? 'hidden' : 'visible';
}, ";");
export var StyledTextAfter = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y16",
    label: "StyledTextAfter"
})();
export var StyledOptionalText = /*#__PURE__*/ styled("span", {
    target: "e1h3xb1y17",
    label: "StyledOptionalText"
})("color:var(", tokens.optionalColor, ");");
export var StyledHintWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y18",
    label: "StyledHintWrapper"
})("display:inline-block;line-height:0;&.", classes.innerLabelPlacement, "{position:absolute;margin:0;inset:var(", tokens.hintInnerLabelPlacementOffset, ");}");
export var HintTargetWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y19",
    label: "HintTargetWrapper"
})("color:var(", tokens.hintIconColor, ");display:flex;justify-content:center;align-items:center;");
export var Hint = /*#__PURE__*/ styled(Tooltip, {
    target: "e1h3xb1y20",
    label: "Hint"
})(HintTargetWrapper, " .", popoverClasses.root, "{width:fit-content;}");
export var HintIconWrapper = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y21",
    label: "HintIconWrapper"
})("display:flex;");
export var StyledIndicator = /*#__PURE__*/ styled("div", {
    target: "e1h3xb1y22",
    label: "StyledIndicator"
})("position:absolute;border-radius:50%;background-color:var(", tokens.indicatorColor, ");&.", classes.outerLabelPlacement, "{width:var(", tokens.indicatorSizeOuter, ");height:var(", tokens.indicatorSizeOuter, ");inset:var(", tokens.indicatorLabelPlacementOuter, ");&.", classes.requiredAlignRight, "{inset:var(", tokens.indicatorLabelPlacementOuterRight, ");&.", classes.hasHint, "{right:calc(\n                    -1 * var(", tokens.indicatorSizeOuter, ") + var(", tokens.indicatorLabelPlacementHintOuterRight, ",0px)\n                );}}}&.", classes.innerLabelPlacement, "{width:var(", tokens.indicatorSizeInner, ");height:var(", tokens.indicatorSizeInner, ");inset:var(", tokens.indicatorLabelPlacementInner, ");&.", classes.requiredAlignRight, "{inset:var(", tokens.indicatorLabelPlacementInnerRight, ");}}");
