import React from 'react';
import cx from 'classnames';
import { ButtonBase } from '../ButtonBase';
import { defaultProps, sizes } from '../.shared/common';
import type { ButtonProps } from '../.shared/types';

function ButtonPrimary({
  children,
  className,
  connectedRight,
  ...rest
}: ButtonProps) {
  const classes = cx('button-primary', className, {
    'button-primary-connected-right': connectedRight,
  });

  return (
    <ButtonBase  className={classes} connectedRight={connectedRight} {...rest}>
      {children}
    </ButtonBase>
  );
}

ButtonPrimary.defaultProps = defaultProps;

ButtonPrimary.sizes = sizes;

export { ButtonPrimary };
