// @flow
import { getPaletteColor } from '../../../mixins/branding';
import type { ThemeProps } from '../../../types';
import { getDisabledFillColor } from '../icon.css-rules';

export const getIconColor = ({
  theme,
  disabled,
  hideBorder = false,
}: {|
  ...ThemeProps,
  disabled?: boolean,
  hideBorder?: boolean,
|}) =>
  disabled && !hideBorder
    ? getDisabledFillColor({ theme })
    : getPaletteColor('greyscale-black')({ theme });
