import styled from "@emotion/styled";
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 = /*#__PURE__*/ styled("div", {
    target: "e149tate0",
    label: "StyledComboboxTarget"
})("display:flex;align-items:center;gap:0.5rem;cursor:pointer;box-sizing:border-box;height:var(", tokens.targetHeight, ");width:var(", tokens.targetWidth, ");overflow:hidden;border-radius:var(", tokens.targetRadius, ");font-family:var(", tokens.targetFontFamily, ");font-size:var(", tokens.targetFontStyle, ");font-weight:var(", tokens.targetFontWeight, ");letter-spacing:var(", tokens.targetLetterSpacing, ");line-height:var(", tokens.targetLineHeight, ");color:var(", tokens.targetColor, ");background-color:", function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBackgroundColorOpen, ")") : "var(".concat(tokens.targetBackgroundColor, ")");
}, ";box-shadow:inset 0 0 0 0.0625rem\n        ", function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBorderColorOpen, ")") : "var(".concat(tokens.targetBorderColor, ")");
}, ";&:hover:not([disabled]):not([readonly]){background-color:", function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBackgroundColorOpen, ")") : "var(".concat(tokens.targetBackgroundColorHover, ")");
}, ";box-shadow:inset 0 0 0 0.0625rem\n            ", function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBorderColorOpen, ")") : "var(".concat(tokens.targetBorderColorHover, ")");
}, ";}&:active:not([disabled]):not([readonly]){background-color:", function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBackgroundColorOpen, ")") : "var(".concat(tokens.targetBackgroundColorActive, ")");
}, ";box-shadow:inset 0 0 0 0.0625rem\n            ", function(param) {
    var opened = param.opened;
    return opened ? "var(".concat(tokens.targetBorderColorOpen, ")") : "var(".concat(tokens.targetBorderColorActive, ")");
}, ";}padding:var(", tokens.targetPaddingWithInput, ");display:flex;justify-content:flex-start;&[disabled]{cursor:not-allowed;opacity:var(", tokens.disabledOpacity, ");}&[readonly]{cursor:default;.", String(comboboxTargetArrow), "{opacity:0.4;}}.", String(arrowInverse), "{transform:rotate(-180deg);}&.", String(hasChips), "{padding:var(", tokens.targetPaddingHasChips, ");}&.", String(innerLabelUp), "{.", String(comboboxTargetInput), ",.", String(comboboxTargeText), "{top:var(", tokens.targetInnerTop, ");}.", String(comboboxTargetLabel), "{top:var(", tokens.targetLabelInnerTop, ");font-family:var(", tokens.targetLabelInnerFontFamily, ");font-size:var(", tokens.targetLabelInnerFontSize, ");font-style:var(", tokens.targetLabelInnerFontStyle, ");font-weight:var(", tokens.targetLabelInnerFontWeight, ");letter-spacing:var(", tokens.targetLabelInnerLetterSpacing, ");line-height:var(", tokens.targetLabelInnerLineHeight, ");}}overflow:visible;--plasma_private-combobox-focus-size:0.0625rem;", 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 = /*#__PURE__*/ styled(IconChevronDown, {
    target: "e149tate1",
    label: "StyledArrow"
})("transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;user-select:none;position:absolute;right:var(", tokens.targetArrowRight, ");color:var(", tokens.targetArrowColor, ");");
export var StyledContent = /*#__PURE__*/ styled("div", {
    target: "e149tate2",
    label: "StyledContent"
})("&.", String(hasChips), "{border-radius:var(", tokens.chipBorderRadius, ");}font-family:var(", tokens.targetFontFamily, ");font-size:var(", tokens.targetFontSize, ");font-style:var(", tokens.targetFontStyle, ");font-weight:var(", tokens.targetFontWeight, ");letter-spacing:var(", tokens.targetLetterSpacing, ");line-height:var(", tokens.targetLineHeight, ");overflow:scroll;position:relative;width:100%;height:var(", tokens.chipHeight, ");display:inline-flex;align-items:center;gap:0.5rem;::-webkit-scrollbar{display:none;}scrollbar-width:none;overscroll-behavior:contain;");
export var StyledComboboxInput = /*#__PURE__*/ styled("input", {
    target: "e149tate3",
    label: "StyledComboboxInput"
})("position:relative;color:var(", tokens.targetColor, ");border:none;outline:none;caret-color:var(", tokens.focusColor, ");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(", tokens.targetLabelColor, ");}&:disabled{cursor:not-allowed;}");
export var StyledComboboxInputHelper = /*#__PURE__*/ styled("div", {
    target: "e149tate4",
    label: "StyledComboboxInputHelper"
})("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 = /*#__PURE__*/ styled("span", {
    target: "e149tate5",
    label: "StyledText"
})("white-space:nowrap;position:relative;user-select:none;color:var(", tokens.targetColor, ");");
export var StyledChips = /*#__PURE__*/ styled("div", {
    target: "e149tate6",
    label: "StyledChips"
})("display:flex;gap:var(", tokens.chipGap, ");user-select:none;");
export var StyledLabel = /*#__PURE__*/ styled("label", {
    target: "e149tate7",
    label: "StyledLabel"
})(applyEllipsis(), ";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(", tokens.targetLabelColor, ");font-family:var(", tokens.targetFontFamily, ");font-size:var(", tokens.targetFontSize, ");font-style:var(", tokens.targetFontStyle, ");font-weight:var(", tokens.targetFontWeight, ");letter-spacing:var(", tokens.targetLetterSpacing, ");line-height:var(", tokens.targetLineHeight, ");");
