import 'package:equatable/equatable.dart';

import '../../../domain/entities/alarm_state.dart';

abstract class AlarmEvent extends Equatable {
  const AlarmEvent();

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

/// Refresh alarms from server
class RefreshAlarms extends AlarmEvent {
  const RefreshAlarms();
}

/// Alarms updated (internal)
class AlarmsUpdated extends AlarmEvent {
  final List<AlarmState> alarms;

  const AlarmsUpdated(this.alarms);

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

/// Acknowledge an alarm
class AcknowledgeAlarm extends AlarmEvent {
  final int alarmId;
  final String serverId;

  const AcknowledgeAlarm({
    required this.alarmId,
    required this.serverId,
  });

  @override
  List<Object?> get props => [alarmId, serverId];
}
