import { jsx as _jsx } from "react/jsx-runtime";
import { useStyleConfig, vui } from '../core';
import { Icon } from '../icon';
import { cs } from '../utils';
import { useTableContext } from './context';
/** Displays a sort icon with given direction based on sort order. */
export const TableSortIcon = vui((props, ref) => {
    const { className, order, ...rest } = props;
    const styles = useStyleConfig('Table', useTableContext());
    const rotate = order === 'asc' ? 180 : 0;
    const pathFill = order ? ['seaBlue.main', 'sandstone.main'] : 'sandstone.main';
    return (_jsx(Icon, { className: cs('vui-tableSortIcon', className), name: "fadSortUp", pathFill: pathFill, ref: ref, rotate: rotate, size: "xs", ...styles.tableSortIcon, ...rest }));
});
TableSortIcon.displayName = 'TableSortIcon';
export default TableSortIcon;
//# sourceMappingURL=tableSortIcon.js.map