import React, { ReactNode } from 'react';
import { BasePrimitiveProps, StyleProp } from '..';

/**
 * Type aliases for a button component.
 */
export type PrimitiveButtonAttributes = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'role'>;
export type PrimitiveButtonElementRef = React.Ref<HTMLButtonElement>;

/**
 * Properties for the Button component.
 */
export interface PrimitiveButtonProps
  extends BasePrimitiveProps,
    StyleProp,
    PrimitiveButtonAttributes {
  /** Content of the button */
  children?: ReactNode;

  /** Disable the button */
  disabled?: boolean;

  /** Loading state of the button */
  loading?: boolean;

  /** Reference to the button element */
  ref?: PrimitiveButtonElementRef;
}
