import styled from "styled-components";
import { IconChevronDown } from "../../../../_Icon";
import { addFocus, applyEllipsis } from "../../../../../mixins";
import { classes, tokens } from "../../Combobox.tokens";
var hasChips = classes.hasChips, innerLabelUp = classes.innerLabelUp, arrowInverse = classes.arrowInverse, comboboxTargetArrow = classes.comboboxTargetArrow, comboboxTargeText = classes.comboboxTargeText, comboboxTargetInput = classes.comboboxTargetInput, comboboxTargetLabel = classes.comboboxTargetLabel;
export var StyledComboboxTarget = styled.div.withConfig({
    displayName: "ComboboxTarget.styles__StyledComboboxTarget",
    componentId: "sc-2249d9e4-0"
})([
    "display:flex;align-items:center;gap:0.5rem;cursor:pointer;box-sizing:border-box;height:var(",
    ");width:var(",
    ");overflow:hidden;border-radius:var(",
    ");font-family:var(",
    ");font-size:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");color:var(",
    ");background-color:",
    ";box-shadow:inset 0 0 0 0.0625rem ",
    ";&:hover:not([disabled]):not([readonly]){background-color:",
    ";box-shadow:inset 0 0 0 0.0625rem ",
    ";}&:active:not([disabled]):not([readonly]){background-color:",
    ";box-shadow:inset 0 0 0 0.0625rem ",
    ";}padding:var(",
    ");display:flex;justify-content:flex-start;&[disabled]{cursor:not-allowed;opacity:var(",
    ");}&[readonly]{cursor:default;.",
    "{opacity:0.4;}}.",
    "{transform:rotate(-180deg);}&.",
    "{padding:var(",
    ");}&.",
    "{.",
    ",.",
    "{top:var(",
    ");}.",
    "{top:var(",
    ");font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");}}overflow:visible;--plasma_private-combobox-focus-size:0.0625rem;",
    ""
], tokens.targetHeight, tokens.targetWidth, tokens.targetRadius, tokens.targetFontFamily, tokens.targetFontStyle, tokens.targetFontWeight, tokens.targetLetterSpacing, tokens.targetLineHeight, tokens.targetColor, function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBackgroundColorOpen, ")") : "var(".concat(tokens.targetBackgroundColor, ")");
}, function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBorderColorOpen, ")") : "var(".concat(tokens.targetBorderColor, ")");
}, function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBackgroundColorOpen, ")") : "var(".concat(tokens.targetBackgroundColorHover, ")");
}, function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBorderColorOpen, ")") : "var(".concat(tokens.targetBorderColorHover, ")");
}, function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBackgroundColorOpen, ")") : "var(".concat(tokens.targetBackgroundColorActive, ")");
}, function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBorderColorOpen, ")") : "var(".concat(tokens.targetBorderColorActive, ")");
}, tokens.targetPaddingWithInput, tokens.disabledOpacity, String(comboboxTargetArrow), String(arrowInverse), String(hasChips), tokens.targetPaddingHasChips, String(innerLabelUp), String(comboboxTargetInput), String(comboboxTargeText), tokens.targetInnerTop, String(comboboxTargetLabel), tokens.targetLabelInnerTop, tokens.targetLabelInnerFontFamily, tokens.targetLabelInnerFontSize, tokens.targetLabelInnerFontStyle, tokens.targetLabelInnerFontWeight, tokens.targetLabelInnerLetterSpacing, tokens.targetLabelInnerLineHeight, addFocus({
    hasTransition: false,
    outlineOffset: 'calc(-1 * var(--plasma_private-combobox-focus-size))',
    outlineRadius: "calc(var(".concat(tokens.targetRadius, ") + var(--plasma_private-combobox-focus-size))"),
    outlineSize: 'var(--plasma_private-combobox-focus-size)',
    customFocusRules: "\n            &:focus-within {\n                box-shadow: none;\n                background-color: var(".concat(tokens.targetBackgroundColorOpen, ");\n\n                &::before {\n                    box-shadow: inset 0 0 0 var(--plasma_private-combobox-focus-size) var(").concat(tokens.targetBorderColorOpen, ");\n                }\n            }\n        ")
}));
export var StyledArrow = styled(IconChevronDown).withConfig({
    displayName: "ComboboxTarget.styles__StyledArrow",
    componentId: "sc-2249d9e4-1"
})([
    "transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;user-select:none;position:absolute;right:var(",
    ");color:var(",
    ");"
], tokens.targetArrowRight, tokens.targetArrowColor);
export var StyledContent = styled.div.withConfig({
    displayName: "ComboboxTarget.styles__StyledContent",
    componentId: "sc-2249d9e4-2"
})([
    "&.",
    "{border-radius:var(",
    ");}font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");overflow:scroll;position:relative;width:100%;height:var(",
    ");display:inline-flex;align-items:center;gap:0.5rem;::-webkit-scrollbar{display:none;}scrollbar-width:none;overscroll-behavior:contain;"
], String(hasChips), tokens.chipBorderRadius, tokens.targetFontFamily, tokens.targetFontSize, tokens.targetFontStyle, tokens.targetFontWeight, tokens.targetLetterSpacing, tokens.targetLineHeight, tokens.chipHeight);
export var StyledComboboxInput = styled.input.withConfig({
    displayName: "ComboboxTarget.styles__StyledComboboxInput",
    componentId: "sc-2249d9e4-3"
})([
    "position:relative;color:var(",
    ");border:none;outline:none;caret-color:var(",
    ");margin:0;padding:0;background:transparent;flex:1;min-width:50%;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;&::placeholder{color:var(",
    ");}&:disabled{cursor:not-allowed;}"
], tokens.targetColor, tokens.focusColor, tokens.targetLabelColor);
export var StyledComboboxInputHelper = styled.div.withConfig({
    displayName: "ComboboxTarget.styles__StyledComboboxInputHelper",
    componentId: "sc-2249d9e4-4"
})([
    "position:absolute;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;white-space:pre-wrap;visibility:hidden;overflow:hidden;"
]);
export var StyledText = styled.span.withConfig({
    displayName: "ComboboxTarget.styles__StyledText",
    componentId: "sc-2249d9e4-5"
})([
    "white-space:nowrap;position:relative;user-select:none;color:var(",
    ");"
], tokens.targetColor);
export var StyledChips = styled.div.withConfig({
    displayName: "ComboboxTarget.styles__StyledChips",
    componentId: "sc-2249d9e4-6"
})([
    "display:flex;gap:var(",
    ");user-select:none;"
], tokens.chipGap);
export var StyledLabel = styled.label.withConfig({
    displayName: "ComboboxTarget.styles__StyledLabel",
    componentId: "sc-2249d9e4-7"
})([
    "",
    ";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;width:100%;height:auto;color:var(",
    ");font-family:var(",
    ");font-size:var(",
    ");font-style:var(",
    ");font-weight:var(",
    ");letter-spacing:var(",
    ");line-height:var(",
    ");"
], applyEllipsis(), tokens.targetLabelColor, tokens.targetFontFamily, tokens.targetFontSize, tokens.targetFontStyle, tokens.targetFontWeight, tokens.targetLetterSpacing, tokens.targetLineHeight);
