part of 'customer_form_cubit.dart';

enum CustomerFormStatus { initial, loading, ready, saving, success, failure }

class CustomerFormState extends Equatable {
  final CustomerFormStatus status;
  final CustomerModel customer;
  final String? errorMessage;

  const CustomerFormState({
    this.status = CustomerFormStatus.initial,
    required this.customer,
    this.errorMessage,
  });

  CustomerFormState copyWith({
    CustomerFormStatus? status,
    CustomerModel? customer,
    String? errorMessage,
  }) {
    return CustomerFormState(
      status: status ?? this.status,
      customer: customer ?? this.customer,
      errorMessage: errorMessage,
    );
  }

  @override
  List<Object?> get props => [status, customer, errorMessage];
}
