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

export const getStrokeColor = ({
  matchCurrentColor,
  theme,
  disabled,
}: {|
  ...ThemeProps,
  ...ArrowForwardProps,
|}) => {
  if (matchCurrentColor) {
    return 'currentColor';
  }

  return disabled
    ? getDisabledFillColor({ theme })
    : getPaletteColor('greyscale-darker')({ theme });
};
