part of 'inclusive_info_bloc.dart';

@immutable
class InclusiveInfoState {
  const InclusiveInfoState({
    this.areAccommodationsRequired,
    this.accommodationsDetails = '',
    this.isInEditMode = true,
    this.status = StateStatus.idle,
  });

  final bool? areAccommodationsRequired;
  final String accommodationsDetails;
  final bool isInEditMode;
  final StateStatus status;

  bool get isFilled {
    return (areAccommodationsRequired != null && !areAccommodationsRequired!) ||
        accommodationsDetails.isNotEmpty;
  }

  InclusiveInfoState copyWith({
    bool? areAccommodationsRequired,
    String? accommodationsDetails,
    bool? isInEditMode,
    StateStatus? status,
  }) {
    return InclusiveInfoState(
      areAccommodationsRequired:
          areAccommodationsRequired ?? this.areAccommodationsRequired,
      accommodationsDetails:
          accommodationsDetails ?? this.accommodationsDetails,
      isInEditMode: isInEditMode ?? this.isInEditMode,
      status: status ?? this.status,
    );
  }
}
