import 'package:hl_lieferservice/feature/delivery/overview/model/sorting_information.dart';

import '../../../../model/tour.dart';

abstract class TourState {}

class TourInitial extends TourState {}

class TourLoading extends TourState {}

class TourRequestingDistances extends TourState {
  Tour tour;
  List<Payment> payments;

  TourRequestingDistances({required this.tour, required this.payments});
}

class TourRequestingSortingInformation extends TourState {
  Tour tour;
  Map<String, double>? distances;
  List<Payment> paymentOptions;

  TourRequestingSortingInformation({
    required this.tour,
    this.distances,
    required this.paymentOptions,
  });
}

class TourLoaded extends TourState {
  Tour tour;
  Map<String, double>? distances;
  List<Payment> paymentOptions;
  SortingInformationContainer sortingInformation;

  TourLoaded({
    required this.tour,
    this.distances,
    required this.paymentOptions,
    required this.sortingInformation
  });

  TourLoaded copyWith({
    Tour? tour,
    Map<String, double>? distances,
    List<Payment>? paymentOptions,
    SortingInformationContainer? sortingInformation
  }) {
    return TourLoaded(
      tour: tour ?? this.tour,
      distances: distances ?? this.distances,
      paymentOptions: paymentOptions ?? this.paymentOptions,
      sortingInformation: sortingInformation ?? this.sortingInformation
    );
  }
}
