import 'package:equatable/equatable.dart';
import '../../models/trip.dart';

abstract class TripState extends Equatable {
  const TripState();

  @override
  List<Object?> get props => [];
}

class TripInitial extends TripState {}

class TripLoading extends TripState {}

class TripLoaded extends TripState {
  final List<Trip> trips;

  const TripLoaded(this.trips);

  @override
  List<Object?> get props => [trips];
}

class TripCreated extends TripState {
  final String tripId;
  final String message;

  const TripCreated({
    required this.tripId,
    this.message = 'Voyage créé avec succès',
  });

  @override
  List<Object?> get props => [tripId, message];
}

class TripOperationSuccess extends TripState {
  final String message;

  const TripOperationSuccess(this.message);

  @override
  List<Object?> get props => [message];
}

class TripError extends TripState {
  final String message;

  const TripError(this.message);

  @override
  List<Object?> get props => [message];
}