// @flow
import type { ThemeProps } from '../../../types';
import { getPaletteColor } from '../../../mixins/branding';

export const getBorderRadius = ({ theme }: ThemeProps) =>
  theme.buttonBorderRadius;

export const getBorderColor = ({
  hideBorder,
  ...rest
}: {|
  ...ThemeProps,
  hideBorder: boolean,
|}) => (hideBorder ? 'transparent' : getPaletteColor('greyscale-light')(rest));

export const getBorderColorHover = ({
  hideBorder,
  ...rest
}: {|
  ...ThemeProps,
  hideBorder: boolean,
|}) => (hideBorder ? 'transparent' : getPaletteColor('greyscale-medium')(rest));

export const getBorderColorActive = ({
  hideBorder,
  ...rest
}: {|
  ...ThemeProps,
  hideBorder: boolean,
|}) => (hideBorder ? 'transparent' : getPaletteColor('greyscale-dark')(rest));
