interface InlineFormActionsProps {
  onCancel: () => void;
  onSubmit: () => void;
  isPending: boolean;
  disabled?: boolean;
  submitLabel?: string;
  submitColorClass?: string;
  className?: string;
}

export function InlineFormActions({
  onCancel,
  onSubmit,
  isPending,
  disabled = false,
  submitLabel = 'Ajouter',
  submitColorClass = 'text-primary hover:bg-primary/10',
  className = '',
}: InlineFormActionsProps) {
  return (
    <div className={`flex justify-end gap-1 ${className}`}>
      <button
        onClick={onCancel}
        className="rounded px-2 py-1 text-xs text-muted hover:bg-card-hover"
        disabled={isPending}
      >
        Annuler
      </button>
      <button
        onMouseDown={(e) => e.preventDefault()}
        onClick={onSubmit}
        disabled={isPending || disabled}
        className={`rounded px-2 py-1 text-xs font-medium disabled:opacity-50 ${submitColorClass}`}
      >
        {isPending ? '...' : submitLabel}
      </button>
    </div>
  );
}
