part of 'scan_bloc.dart';

abstract class ScanEvent extends Equatable {
  const ScanEvent();

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

class InitializeScan extends ScanEvent {
  final Tour tour;

  const InitializeScan(this.tour);

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

class ProcessBarcode extends ScanEvent {
  final String barcode;

  const ProcessBarcode({required this.barcode});

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

class ValidateBarcode extends ScanEvent {
  final String barcode;

  const ValidateBarcode({required this.barcode});

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

class UpdateObjectState extends ScanEvent {
  final LogisticObject object;
  final String newState;
  final int? locationId;
  final String? containerCode;

  const UpdateObjectState({
    required this.object,
    required this.newState,
    this.locationId,
    this.containerCode,
  });

  @override
  List<Object?> get props => [object, newState, locationId, containerCode];
}

class ResetScan extends ScanEvent {
  const ResetScan();
}

class CreateUnknownObject extends ScanEvent {
  final String barcode;
  final int type;

  const CreateUnknownObject({
    required this.barcode,
    required this.type,
  });

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