part of 'shift_details_bloc.dart';

@immutable
class ShiftDetailsState {
  final ShiftEntity shiftViewModel;
  final bool isToFar;
  final bool isLoading;
  final GeofencingProximityState proximityState;
  final String? errorMessage;
  final bool needPop;

  const ShiftDetailsState({
    required this.shiftViewModel,
    this.isToFar = true,
    this.isLoading = false,
    this.proximityState = GeofencingProximityState.none,
    this.errorMessage,
    this.needPop = false,
  });

  ShiftDetailsState copyWith({
    ShiftEntity? shiftViewModel,
    bool? isToFar,
    bool? isLoading,
    GeofencingProximityState? proximityState,
    String? errorMessage,
    bool? needPop
  }) {
    return ShiftDetailsState(
      shiftViewModel: shiftViewModel ?? this.shiftViewModel,
      isToFar: isToFar ?? this.isToFar,
      isLoading: isLoading ?? false,
      proximityState: proximityState ?? this.proximityState,
      errorMessage: errorMessage,
       needPop: needPop ?? this.needPop,
    );
  }
}

enum GeofencingProximityState {
  none,
  tooFar,
  locationDisabled,
  goToSettings,
  onlyInUse,
  permissionDenied,
}
