import React, { useMemo } from "react";
import ArrowUp from "@pisell/icon/es/ArrowUp";
import ChevronSelectorVertical from "@pisell/icon/es/ChevronSelectorVertical";
import classNames from "classnames";
var SortIcon = function SortIcon(props) {
  var sortOrder = props.sortOrder;
  var content = useMemo(function () {
    if (sortOrder === "ascend") {
      return /*#__PURE__*/React.createElement(ArrowUp, {
        className: "pisell-table-column-up"
      });
    }
    if (sortOrder === "descend") {
      return /*#__PURE__*/React.createElement(ArrowUp, {
        className: "pisell-table-column-down"
      });
    }
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ChevronSelectorVertical, {
      style: {
        fontSize: 18,
        color: "#98A2B3"
      }
    }));
  }, [sortOrder]);
  return /*#__PURE__*/React.createElement("span", {
    className: classNames("pisell-table-sorter-inner", {
      active: !!sortOrder
    })
  }, content);
};
export default SortIcon;