import styled from "styled-components";
import { component, mergeConfig } from "../../../../../../engines";
import { IconDisclosureDownCentered } from "../../../../../_Icon";
import { textFieldConfig, textFieldTokens } from "../../../../../TextField";
import { tokens, classes } from "../../../../Select.tokens";
const mergedConfig = mergeConfig(textFieldConfig);
const TextField = component(mergedConfig);
export const StyledTextField = styled(TextField).withConfig({
    displayName: "Textfield.styles__StyledTextField",
    componentId: "sc-46e97bb-0"
})([
    ``,
    `:var(`,
    `);`,
    `:`,
    `;`,
    `:`,
    `;`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:`,
    `;`,
    `:`,
    `;`,
    `:`,
    `;`,
    `:`,
    `;`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);`,
    `:var(`,
    `);&:not([readonly]),&:not([readonly]) input,&:not([readonly]) label{cursor:pointer;}`
], textFieldTokens.color, tokens.textFieldColor, textFieldTokens.backgroundColor, ({ opened })=>opened ? `var(${tokens.textFieldBackgroundColorFocus})` : `var(${tokens.textFieldBackgroundColor})`, textFieldTokens.borderColor, ({ opened })=>opened ? `var(${tokens.textFieldBorderColorFocus})` : `var(${tokens.textFieldBorderColor})`, textFieldTokens.labelColor, tokens.textFieldLabelColor, textFieldTokens.leftHelperColor, tokens.textFieldLeftHelperColor, textFieldTokens.colorReadOnly, tokens.textFieldColorReadOnly, textFieldTokens.backgroundColorReadOnly, tokens.textFieldBackgroundColorReadOnly, textFieldTokens.placeholderColorReadOnly, tokens.textFieldPlaceholderColorReadOnly, textFieldTokens.leftHelperColorReadOnly, tokens.textFieldLeftHelperColor, textFieldTokens.labelColorReadOnly, tokens.textFieldLabelColor, textFieldTokens.borderColorReadOnly, tokens.textFieldBorderColorReadOnly, textFieldTokens.readOnlyOpacity, tokens.textFieldReadOnlyOpacity, textFieldTokens.placeholderColor, ({ opened })=>opened ? `var(${tokens.textFieldPlaceholderColorFocus})` : `var(${tokens.textFieldPlaceholderColor})`, textFieldTokens.placeholderColorFocus, ({ opened })=>opened ? `var(${tokens.textFieldPlaceholderColorFocus})` : `var(${tokens.textFieldPlaceholderColor})`, textFieldTokens.backgroundColorHover, ({ opened })=>opened ? `var(${tokens.textFieldBackgroundColorFocus})` : `var(${tokens.textFieldBackgroundColorHover})`, textFieldTokens.borderColorHover, ({ opened })=>opened ? `var(${tokens.textFieldBorderColorFocus})` : `var(${tokens.textFieldBorderColorHover})`, textFieldTokens.borderColorFocus, tokens.textFieldBorderColorFocus, textFieldTokens.optionalColor, tokens.textFieldOptionalColor, textFieldTokens.height, tokens.textFieldHeight, textFieldTokens.borderWidth, tokens.textFieldBorderWidth, textFieldTokens.borderRadius, tokens.textFieldBorderRadius, textFieldTokens.padding, tokens.textFieldPadding, textFieldTokens.paddingWithChips, tokens.textFieldPaddingWithChips, textFieldTokens.leftContentMargin, tokens.textFieldLeftContentMargin, textFieldTokens.rightContentMargin, tokens.textFieldRightContentMargin, textFieldTokens.rightContentWithHintMargin, tokens.textFieldRightContentWithHintMargin, textFieldTokens.contentRightWrapperGap, tokens.textFieldContentRightWrapperGap, textFieldTokens.contentRightWrapperMargin, tokens.textFieldContentRightWrapperMargin, textFieldTokens.fontFamily, tokens.textFieldFontFamily, textFieldTokens.fontStyle, tokens.textFieldFontStyle, textFieldTokens.fontSize, tokens.textFieldFontSize, textFieldTokens.fontWeight, tokens.textFieldFontWeight, textFieldTokens.letterSpacing, tokens.textFieldLetterSpacing, textFieldTokens.lineHeight, tokens.textFieldLineHeight, textFieldTokens.contentSlotColor, tokens.textFieldContentSlotColor, textFieldTokens.contentSlotColorHover, tokens.textFieldContentSlotColorHover, textFieldTokens.contentSlotColorActive, tokens.textFieldContentSlotColorActive, textFieldTokens.contentSlotRightColor, tokens.textFieldContentSlotRightColor, textFieldTokens.contentSlotRightColorHover, tokens.textFieldContentSlotRightColorHover, textFieldTokens.contentSlotRightColorActive, tokens.textFieldContentSlotRightColorActive, textFieldTokens.labelOffset, tokens.textFieldLabelOffset, textFieldTokens.labelFontFamily, tokens.textFieldLabelFontFamily, textFieldTokens.labelFontStyle, tokens.textFieldLabelFontStyle, textFieldTokens.labelFontSize, tokens.textFieldLabelFontSize, textFieldTokens.labelFontWeight, tokens.textFieldLabelFontWeight, textFieldTokens.labelLetterSpacing, tokens.textFieldLabelLetterSpacing, textFieldTokens.labelLineHeight, tokens.textFieldLabelLineHeight, textFieldTokens.labelInnerFontFamily, tokens.textFieldLabelInnerFontFamily, textFieldTokens.labelInnerFontStyle, tokens.textFieldLabelInnerFontStyle, textFieldTokens.labelInnerFontSize, tokens.textFieldLabelInnerFontSize, textFieldTokens.labelInnerFontWeight, tokens.textFieldLabelInnerFontWeight, textFieldTokens.labelInnerLetterSpacing, tokens.textFieldLabelInnerLetterSpacing, textFieldTokens.labelInnerLineHeight, tokens.textFieldLabelInnerLineHeight, textFieldTokens.labelInnerPadding, tokens.textFieldLabelInnerPadding, textFieldTokens.contentLabelInnerPadding, tokens.textFieldContentLabelInnerPadding, textFieldTokens.titleCaptionColor, tokens.textFieldTitleCaptionColor, textFieldTokens.titleCaptionInnerLabelOffset, tokens.textFieldTitleCaptionInnerLabelOffset, textFieldTokens.titleCaptionFontFamily, tokens.textFieldTitleCaptionFontFamily, textFieldTokens.titleCaptionFontStyle, tokens.textFieldTitleCaptionFontStyle, textFieldTokens.titleCaptionFontSize, tokens.textFieldTitleCaptionFontSize, textFieldTokens.titleCaptionFontWeight, tokens.textFieldTitleCaptionFontWeight, textFieldTokens.titleCaptionLetterSpacing, tokens.textFieldTitleCaptionLetterSpacing, textFieldTokens.titleCaptionLineHeight, tokens.textFieldTitleCaptionLineHeight, textFieldTokens.leftHelperOffset, tokens.textFieldLeftHelperOffset, textFieldTokens.leftHelperFontFamily, tokens.textFieldLeftHelperFontFamily, textFieldTokens.leftHelperFontStyle, tokens.textFieldLeftHelperFontStyle, textFieldTokens.leftHelperFontSize, tokens.textFieldLeftHelperFontSize, textFieldTokens.leftHelperFontWeight, tokens.textFieldLeftHelperFontWeight, textFieldTokens.leftHelperLetterSpacing, tokens.textFieldLeftHelperLetterSpacing, textFieldTokens.leftHelperLineHeight, tokens.textFieldLeftHelperLineHeight, textFieldTokens.textBeforeColor, tokens.textFieldTextBeforeColor, textFieldTokens.textAfterColor, tokens.textFieldTextAfterColor, textFieldTokens.textBeforeMargin, tokens.textFieldTextBeforeMargin, textFieldTokens.textAfterMargin, tokens.textFieldTextAfterMargin, textFieldTokens.disabledOpacity, tokens.textFieldDisabledOpacity, textFieldTokens.hintCustomIconTargetSize, tokens.textFieldHintCustomIconTargetSize, textFieldTokens.hintMargin, tokens.textFieldHintMargin, textFieldTokens.hintTargetSize, tokens.textFieldHintTargetSize, textFieldTokens.hintIconColor, tokens.textFieldHintIconColor, textFieldTokens.hintInnerLabelPlacementOffset, tokens.textFieldHintInnerLabelPlacementOffset, textFieldTokens.clearHintInnerLabelPlacementOffset, tokens.textFieldClearHintInnerLabelPlacementOffset, textFieldTokens.tooltipBackgroundColor, tokens.textFieldTooltipBackgroundColor, textFieldTokens.tooltipBoxShadow, tokens.textFieldTooltipBoxShadow, textFieldTokens.tooltipColor, tokens.textFieldTooltipColor, textFieldTokens.tooltipPaddingTop, tokens.textFieldTooltipPaddingTop, textFieldTokens.tooltipPaddingRight, tokens.textFieldTooltipPaddingRight, textFieldTokens.tooltipPaddingBottom, tokens.textFieldTooltipPaddingBottom, textFieldTokens.tooltipPaddingLeft, tokens.textFieldTooltipPaddingLeft, textFieldTokens.tooltipMinHeight, tokens.textFieldTooltipMinHeight, textFieldTokens.tooltipBorderRadius, tokens.textFieldTooltipBorderRadius, textFieldTokens.tooltipTextFontFamily, tokens.textFieldTooltipTextFontFamily, textFieldTokens.tooltipTextFontSize, tokens.textFieldTooltipTextFontSize, textFieldTokens.tooltipTextFontStyle, tokens.textFieldTooltipTextFontStyle, textFieldTokens.tooltipTextFontWeight, tokens.textFieldTooltipTextFontWeight, textFieldTokens.tooltipTextFontLetterSpacing, tokens.textFieldTooltipTextFontLetterSpacing, textFieldTokens.tooltipTextFontLineHeight, tokens.textFieldTooltipTextFontLineHeight, textFieldTokens.tooltipContentLeftMargin, tokens.textFieldTooltipContentLeftMargin, textFieldTokens.tooltipArrowMaskWidth, tokens.textFieldTooltipArrowMaskWidth, textFieldTokens.tooltipArrowMaskHeight, tokens.textFieldTooltipArrowMaskHeight, textFieldTokens.tooltipArrowMaskImage, tokens.textFieldTooltipArrowMaskImage, textFieldTokens.tooltipArrowHeight, tokens.textFieldTooltipArrowHeight, textFieldTokens.tooltipArrowEdgeMargin, tokens.textFieldTooltipArrowEdgeMargin, textFieldTokens.tooltipArrowBackground, tokens.textFieldTooltipArrowBackground, textFieldTokens.chipHeight, tokens.textFieldChipHeight, textFieldTokens.chipBorderRadius, tokens.textFieldChipBorderRadius, textFieldTokens.chipGap, tokens.textFieldChipGap, textFieldTokens.chipColor, tokens.textFieldChipColor, textFieldTokens.chipColorHover, tokens.textFieldChipColorHover, textFieldTokens.chipBackground, tokens.textFieldChipBackground, textFieldTokens.chipBackgroundHover, tokens.textFieldChipBackgroundHover, textFieldTokens.chipBackgroundActive, tokens.textFieldChipBackgroundActive, textFieldTokens.chipColorActive, tokens.textFieldChipColorActive, textFieldTokens.chipCloseIconColor, tokens.textFieldChipCloseIconColor, textFieldTokens.chipCloseIconColorHover, tokens.textFieldChipCloseIconColorHover, textFieldTokens.chipCloseIconColorReadonly, tokens.textFieldChipCloseIconColorReadonly, textFieldTokens.chipOutlineSize, tokens.textFieldChipOutlineSize, textFieldTokens.chipWidth, tokens.textFieldChipWidth, textFieldTokens.chipPadding, tokens.textFieldChipPadding, textFieldTokens.chipCloseIconSize, tokens.textFieldChipCloseIconSize, textFieldTokens.chipFontFamily, tokens.textFieldChipFontFamily, textFieldTokens.chipFontSize, tokens.textFieldChipFontSize, textFieldTokens.chipFontStyle, tokens.textFieldChipFontStyle, textFieldTokens.chipFontWeight, tokens.textFieldChipFontWeight, textFieldTokens.chipLetterSpacing, tokens.textFieldChipLetterSpacing, textFieldTokens.chipLineHeight, tokens.textFieldChipLineHeight, textFieldTokens.chipColorReadOnly, tokens.textFieldChipColor, textFieldTokens.chipColorReadOnlyHover, tokens.textFieldChipColor, textFieldTokens.chipBackgroundReadOnly, tokens.textFieldChipBackground, textFieldTokens.chipBackgroundReadOnlyHover, tokens.textFieldChipBackgroundHover, textFieldTokens.chipClearContentMarginLeft, tokens.textFieldChipClearContentMarginLeft, textFieldTokens.chipClearContentMarginRight, tokens.textFieldChipClearContentMarginRight, textFieldTokens.chipsFlexWrap, tokens.textFieldChipsFlexWrap, textFieldTokens.scrollableWrapperOverflow, tokens.textFieldScrollableWrapperOverflow, textFieldTokens.scrollableWrapperHeight, tokens.textFieldScrollableWrapperHeight, textFieldTokens.inputContainerDisplay, tokens.textFieldInputContainerDisplay, textFieldTokens.indicatorColor, tokens.textFieldIndicatorColor, textFieldTokens.indicatorSizeInner, tokens.textFieldIndicatorSizeInner, textFieldTokens.indicatorSizeOuter, tokens.textFieldIndicatorSizeOuter, textFieldTokens.indicatorLabelPlacementInner, tokens.textFieldIndicatorLabelPlacementInner, textFieldTokens.indicatorLabelPlacementOuter, tokens.textFieldIndicatorLabelPlacementOuter, textFieldTokens.indicatorLabelPlacementInnerRight, tokens.textFieldIndicatorLabelPlacementInnerRight, textFieldTokens.indicatorLabelPlacementOuterRight, tokens.textFieldIndicatorLabelPlacementOuterRight, textFieldTokens.clearIndicatorLabelPlacementInner, tokens.textFieldClearIndicatorLabelPlacementInner, textFieldTokens.clearIndicatorLabelPlacementInnerRight, tokens.textFieldClearIndicatorLabelPlacementInnerRight, textFieldTokens.clearIndicatorHintInnerRight, tokens.textFieldClearIndicatorHintInnerRight, textFieldTokens.focusColor, tokens.textFieldFocusColor, textFieldTokens.boxShadow, tokens.textFieldBoxShadow, textFieldTokens.boxShadowSecondary, tokens.textFieldBoxShadowSecondary);
export const IconArrowWrapper = styled.div.withConfig({
    displayName: "Textfield.styles__IconArrowWrapper",
    componentId: "sc-46e97bb-1"
})([
    `line-height:0;color:var(`,
    `);cursor:`,
    `;.`,
    `{transform:rotate(-180deg);}&:hover,&:active{color:`,
    `;}opacity:`,
    `;`
], tokens.disclosureIconColor, ({ disabled, readOnly })=>disabled || readOnly ? 'inherit' : 'pointer', classes.arrowInverse, ({ disabled, readOnly })=>disabled || readOnly ? `var(${tokens.disclosureIconColor})` : `var(${tokens.disclosureIconColorHover})`, ({ readOnly })=>readOnly ? `var(${tokens.disclosureIconOpacityReadOnly})` : '');
// TODO: Удалить после поддержки JS переменных в конфиге компонент
export const sizeMap = {
    xs: '1rem',
    s: '1.5rem'
};
export const StyledArrow = styled(IconDisclosureDownCentered).withConfig({
    displayName: "Textfield.styles__StyledArrow",
    componentId: "sc-46e97bb-2"
})([
    `width:`,
    `;height:`,
    `;`
], ({ size = 'xs' })=>`var(${tokens.disclosureIconSize}, ${sizeMap[size]})`, ({ size = 'xs' })=>`var(${tokens.disclosureIconSize}, ${sizeMap[size]})`);
export const StyledLeftHelper = styled.span.withConfig({
    displayName: "Textfield.styles__StyledLeftHelper",
    componentId: "sc-46e97bb-3"
})([
    `margin:0;padding:0;`
]);
