import 'package:equatable/equatable.dart';

class UploadItem extends Equatable {
  final String fileName;
  final double progress;
  final bool isPaused;
  final bool isCompleted;
  final String? error;

  const UploadItem({
    required this.fileName,
    this.progress = 0.0,
    this.isPaused = false,
    this.isCompleted = false,
    this.error,
  });

  @override
  List<Object?> get props => [fileName, progress, isPaused, isCompleted, error];
}

abstract class UploadState extends Equatable {
  const UploadState();

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

class UploadInitial extends UploadState {}

class UploadInProgress extends UploadState {
  final List<UploadItem> uploads;

  const UploadInProgress(this.uploads);

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

class UploadError extends UploadState {
  final String error;

  const UploadError(this.error);

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