import 'package:equatable/equatable.dart';
import 'package:flux/features/tickets/models/ticket_model.dart';
// Adatta gli import al tuo progetto!

enum TicketFormStatus {
  initial,
  ready,
  loading,
  saving,
  success,
  pop,
  failure,
  deleted,
}

class TicketFormState extends Equatable {
  final TicketModel ticket;
  final TicketFormStatus status;
  final String? errorMessage;

  const TicketFormState({
    required this.ticket,
    this.status = TicketFormStatus.initial,
    this.errorMessage,
  });

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

  TicketFormState copyWith({
    TicketModel? ticket,
    TicketFormStatus? status,
    String? errorMessage,
  }) {
    return TicketFormState(
      ticket: ticket ?? this.ticket,
      status: status ?? this.status,
      errorMessage: errorMessage,
    );
  }
}
