import 'package:equatable/equatable.dart';

/// Entity representing a shift for the staff home screen.
///
/// This entity aggregates essential shift details needed for display cards.
class Shift extends Equatable {
  const Shift({
    required this.id,
    required this.title,
    required this.clientName,
    this.logoUrl,
    required this.hourlyRate,
    required this.location,
    this.locationAddress,
    required this.date,
    required this.startTime,
    required this.endTime,
    required this.createdDate,
    this.tipsAvailable,
    this.travelTime,
    this.mealProvided,
    this.parkingAvailable,
    this.gasCompensation,
    this.description,
    this.instructions,
    this.managers,
    this.latitude,
    this.longitude,
    this.status,
    this.durationDays,
  });

  final String id;
  final String title;
  final String clientName;
  final String? logoUrl;
  final double hourlyRate;
  final String location;
  final String? locationAddress;
  final String date;
  final String startTime;
  final String endTime;
  final String createdDate;
  final bool? tipsAvailable;
  final bool? travelTime;
  final bool? mealProvided;
  final bool? parkingAvailable;
  final bool? gasCompensation;
  final String? description;
  final String? instructions;
  final List<ShiftManager>? managers;
  final double? latitude;
  final double? longitude;
  final String? status;
  final int? durationDays;

  @override
  List<Object?> get props => [
    id,
    title,
    clientName,
    logoUrl,
    hourlyRate,
    location,
    locationAddress,
    date,
    startTime,
    endTime,
    createdDate,
    tipsAvailable,
    travelTime,
    mealProvided,
    parkingAvailable,
    gasCompensation,
    description,
    instructions,
    managers,
    latitude,
    longitude,
    status,
    durationDays,
  ];
}

class ShiftManager extends Equatable {
  const ShiftManager({required this.name, required this.phone, this.avatar});

  final String name;
  final String phone;
  final String? avatar;

  @override
  List<Object?> get props => [name, phone, avatar];
}
