// @flow
import { getPaletteColor } from '../../../mixins/branding/branding.css-rules';
import { type ColorPaletteColorNameKey } from '../../../mixins/branding/branding.proptypes';
import { type ThemeProps } from '../../../types';
import {
  DEFAULT_FG_COLOR,
  DEFAULT_BG_COLOR,
} from './circular-progress-bar.constants';

export const getPathColor = ({
  theme,
  color = DEFAULT_FG_COLOR,
}: ThemeProps & { color: ColorPaletteColorNameKey }) =>
  getPaletteColor(color)({ theme });

export const getTrailColor = ({
  theme,
  bgColor = DEFAULT_BG_COLOR,
}: ThemeProps & { bgColor: ColorPaletteColorNameKey }) =>
  getPaletteColor(bgColor)({ theme });
