import 'package:hl_lieferservice/domain/entity/car.dart';

sealed class CarsState {
  const CarsState();
}

class CarsInitial extends CarsState {
  const CarsInitial();
}

class CarsLoading extends CarsState {
  const CarsLoading();
}

class CarsLoadingFailed extends CarsState {
  const CarsLoadingFailed({this.message});
  final String? message;
}

class CarsLoaded extends CarsState {
  const CarsLoaded({required this.cars});
  final List<Car> cars;

  CarsLoaded copyWith({List<Car>? cars}) =>
      CarsLoaded(cars: cars ?? this.cars);
}
