import 'package:equatable/equatable.dart';

import 'availability_slot.dart';

/// Represents availability configuration for a specific date.
class DayAvailability extends Equatable {
  final DateTime date;
  final bool isAvailable;
  final List<AvailabilitySlot> slots;

  const DayAvailability({
    required this.date,
    this.isAvailable = false,
    this.slots = const [],
  });

  DayAvailability copyWith({
    DateTime? date,
    bool? isAvailable,
    List<AvailabilitySlot>? slots,
  }) {
    return DayAvailability(
      date: date ?? this.date,
      isAvailable: isAvailable ?? this.isAvailable,
      slots: slots ?? this.slots,
    );
  }

  @override
  List<Object?> get props => [date, isAvailable, slots];
}
