"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SortIcon = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _ = require("../../../..");
var _constants = require("../../shared/constants");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var StyledIconChevronDown = (0, _styledComponents.default)(_.OldIcon.ChevronDown).withConfig({
  displayName: "SortIcon__StyledIconChevronDown",
  componentId: "sc-rstfua-0"
})(["margin-left:", "px;"], function (p) {
  return p.theme.spacing.unit(1);
});
var StyledIconSortArrow = (0, _styledComponents.default)(_.OldIcon.SortArrow).withConfig({
  displayName: "SortIcon__StyledIconSortArrow",
  componentId: "sc-rstfua-1"
})(["margin-left:", "px;"], function (p) {
  return p.theme.spacing.unit(1);
});
var SortIcon = exports.SortIcon = function SortIcon(_ref) {
  var sortOrder = _ref.sortOrder;
  if (sortOrder === _constants.SORT_ORDER_NONE) {
    return _react.default.createElement(StyledIconChevronDown, {
      inline: true,
      size: 2,
      color: function color(t) {
        return t.color.label;
      }
    });
  }
  return _react.default.createElement(StyledIconSortArrow, {
    inline: true,
    direction: sortOrder,
    size: 3,
    color: function color(t) {
      return t.color.text;
    }
  });
};