import styled, { css } from 'styled-components';
import { Box } from '../Box/Box';
import { StyledButton } from '../Button/Button.styles';
import { StyledCheckboxLabel } from '../Checkbox/Checkbox.styles';
import { getTypographyIntent, typographyWeights } from '../Typography/Typography.styles';
import { colors } from '../_styles/colors';
import { getFocus } from '../_styles/mixins';
import { spacing } from '../_styles/spacing';
var optionMinHeight = 32;

// Do not merge with StyledMenu, needed for max-height working in IE
export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledWrapper",
  componentId: "core-12_4_1__sc-z984sz-0"
})(["border-radius:inherit;display:flex;max-height:inherit;min-width:inherit;outline:none;width:inherit;"]);
export var StyledMenu = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledMenu",
  componentId: "core-12_4_1__sc-z984sz-1"
})(["border-radius:inherit;display:flex;flex-direction:column;outline:0;width:100%;"]);
export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledOptions",
  componentId: "core-12_4_1__sc-z984sz-2"
})(["flex-basis:auto;flex-grow:1;flex-shrink:1;min-height:", "px;", ";padding:", "px 0;position:relative;&:focus-visible{", " margin:-1px;}"], optionMinHeight, function (_ref) {
  var _ref$$scrollable = _ref.$scrollable,
    $scrollable = _ref$$scrollable === void 0 ? true : _ref$$scrollable;
  return $scrollable && "overflow-y: auto";
}, spacing.sm, getFocus());
export var StyledGrip = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledGrip",
  componentId: "core-12_4_1__sc-z984sz-3"
})(["padding:0 2px;height:24px;visibility:hidden;"]);
export var StyledHeader = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledHeader",
  componentId: "core-12_4_1__sc-z984sz-4"
})([""]);
export var StyledSearch = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledSearch",
  componentId: "core-12_4_1__sc-z984sz-5"
})(["padding:", "px ", "px ", "px;", " > *{pointer-events:none;}"], spacing.lg, spacing.lg, spacing.sm, StyledButton);
export var StyledGroup = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledGroup",
  componentId: "core-12_4_1__sc-z984sz-6"
})(["", " color:", ";cursor:", ";font-weight:", ";padding:", "px ", "px;&:not(:first-child){padding-top:", "px;}"], getTypographyIntent('body'), colors.gray15, function (_ref2) {
  var $clickable = _ref2.$clickable;
  return $clickable ? 'pointer' : 'default';
}, typographyWeights.semibold, spacing.xs, spacing.lg, spacing.md + spacing.xs);
export var StyledItem = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledItem",
  componentId: "core-12_4_1__sc-z984sz-7"
})(["", ";", " cursor:pointer;list-style-type:none;padding:", "px ", "px;a{color:", ";display:block;margin:-", "px -", "px;padding:", "px ", "px;text-decoration:none;&:hover{color:", ";text-decoration:none;}}&[data-highlighted='true']{background-color:", ";}", " &:hover,&:active{", "{visibility:visible;}}", "{color:inherit;cursor:pointer;}", " ", " ", ""], getTypographyIntent('body'), function (_ref3) {
  var as = _ref3.as;
  return as === 'a' && css(["display:block;text-decoration:none;"]);
}, spacing.xs, spacing.lg, colors.gray15, spacing.xs, spacing.lg, spacing.xs, spacing.lg, colors.gray15, colors.gray96, function (_ref4) {
  var $highlighted = _ref4.$highlighted;
  return $highlighted && "background-color: ".concat(colors.gray96, ";");
}, StyledGrip, StyledCheckboxLabel, function (_ref5) {
  var $disabled = _ref5.$disabled,
    $selected = _ref5.$selected;
  if ($disabled) {
    return css(["&,", "{color:", ";cursor:default;}"], StyledCheckboxLabel, colors.gray85);
  } else if ($selected) {
    return css(["color:", ";font-weight:700;a,a:hover{color:", ";text-decoration:none;}&[data-highlighted='true']{background-color:", ";}"], colors.blue50, colors.blue50, colors.gray96);
  }
  return css(["color:", ";&[data-highlighted='true']{background-color:", ";}"], colors.gray15, colors.gray96);
}, function (_ref6) {
  var $isDraggable = _ref6.$isDraggable;
  if ($isDraggable) {
    return css(["display:flex;align-items:center;", "{cursor:grab;&:before,&:after{cursor:pointer;}}&&&{padding-left:0;}"], StyledCheckboxLabel);
  }
}, function (_ref7) {
  var $isDragging = _ref7.$isDragging;
  if ($isDragging) {
    return css(["background-color:", ";", "{visibility:visible;}"], colors.gray96, StyledGrip);
  }
});
export var StyledDroppable = /*#__PURE__*/styled.div.withConfig({
  displayName: "StyledDroppable",
  componentId: "core-12_4_1__sc-z984sz-8"
})(["", ",", "{padding-left:28px;}"], StyledGroup, StyledItem);
export var StyledFooter = /*#__PURE__*/styled(Box).withConfig({
  displayName: "StyledFooter",
  componentId: "core-12_4_1__sc-z984sz-9"
})(["border-top:1px solid ", ";border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;"], colors.gray85);
//# sourceMappingURL=MenuImperative.styles.js.map