interface AuthSubmitProps {
  loading: boolean;
  idleText: string;
  loadingText: string;
  disabled?: boolean;
}

export function AuthSubmit({
  loading,
  idleText,
  loadingText,
  disabled = false
}: AuthSubmitProps): JSX.Element {
  return (
    <button className="z-login-submit" type="submit" disabled={disabled || loading}>
      {loading ? loadingText : idleText}
    </button>
  );
}
