// @flow

import PropTypes from 'prop-types';
import type { ContainerProps } from '../../../mixins/container';
import type { BrandProps } from '../../../mixins/branding';
import type { FontSize } from '../../../mixins/typography';
import { containerPropTypes } from '../../../mixins/container';
import { brandPropTypes } from '../../../mixins/branding';
import { typographyPropTypes } from '../../../mixins/typography';

export type LinkProps = ContainerProps &
  BrandProps & {
    href?: string,
    target?: string,
    fontSize?: FontSize,
    type?: 'submit' | 'button',
    onClick?: (event: SyntheticEvent<HTMLButtonElement>) => void,
  };

export const linkPropTypes = {
  ...containerPropTypes,
  ...brandPropTypes(),
  href: PropTypes.string,
  target: PropTypes.string,
  fontSize: typographyPropTypes.fontSize,
};
