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

export const getFillColor = ({
  theme,
  disabled,
  useCurrentColor,
}: ThemeProps & ToggleArrowsProps) => {
  if (useCurrentColor) {
    return 'currentColor';
  }

  return disabled
    ? getDisabledFillColor({ theme })
    : getPaletteColor('brand-secondary-fg')({ theme });
};
