import 'package:equatable/equatable.dart';
import 'package:krow_domain/src/entities/shifts/break/break.dart';

class Shift extends Equatable {
  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; // For multi-day shifts
  final int? requiredSlots;
  final int? filledSlots;
  final String? roleId;
  final bool? hasApplied;
  final double? totalValue;
  final Break? breakInfo;

  const Shift({
    required this.id,
    required this.title,
    required this.clientName,
    this.logoUrl,
    required this.hourlyRate,
    required this.location,
    required 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,
    this.requiredSlots,
    this.filledSlots,
    this.roleId,
    this.hasApplied,
    this.totalValue,
    this.breakInfo,
  });

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

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 => <Object?>[name, phone, avatar];
}
