/// Events pour SystemSettingsBloc
library system_settings_event;

import 'package:equatable/equatable.dart';

abstract class SystemSettingsEvent extends Equatable {
  const SystemSettingsEvent();

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

// ── Chargement ─────────────────────────────────────────────────────────────
class LoadSystemConfig extends SystemSettingsEvent {}
class LoadCacheStats extends SystemSettingsEvent {}
class LoadSystemMetrics extends SystemSettingsEvent {}

// ── Configuration ──────────────────────────────────────────────────────────
class UpdateSystemConfig extends SystemSettingsEvent {
  final Map<String, dynamic> config;
  const UpdateSystemConfig(this.config);
  @override
  List<Object?> get props => [config];
}

class ResetSystemConfig extends SystemSettingsEvent {}

// ── Tests ───────────────────────────────────────────────────────────────────
class TestDatabaseConnection extends SystemSettingsEvent {}
class TestEmailConfiguration extends SystemSettingsEvent {}

// ── Cache ────────────────────────────────────────────────────────────────────
class ClearCache extends SystemSettingsEvent {}

// ── Base de données ──────────────────────────────────────────────────────────
class OptimizeDatabase extends SystemSettingsEvent {}

// ── Sécurité ─────────────────────────────────────────────────────────────────
class ForceGlobalLogout extends SystemSettingsEvent {}
class CleanupSessions extends SystemSettingsEvent {}
class ExportGDPRData extends SystemSettingsEvent {}

// ── Logs ─────────────────────────────────────────────────────────────────────
class CleanOldLogs extends SystemSettingsEvent {}
class ExportLogs extends SystemSettingsEvent {}

// ── Données ──────────────────────────────────────────────────────────────────
class PurgeExpiredData extends SystemSettingsEvent {}

// ── Performance ──────────────────────────────────────────────────────────────
class AnalyzePerformance extends SystemSettingsEvent {}

// ── Sauvegarde ────────────────────────────────────────────────────────────────
class CreateBackup extends SystemSettingsEvent {}

// ── Maintenance ───────────────────────────────────────────────────────────────
class ScheduleMaintenance extends SystemSettingsEvent {
  final String? scheduledAt;
  final String? reason;
  const ScheduleMaintenance({this.scheduledAt, this.reason});
  @override
  List<Object?> get props => [scheduledAt, reason];
}

class EmergencyMaintenance extends SystemSettingsEvent {}

// ── Mises à jour ──────────────────────────────────────────────────────────────
class CheckUpdates extends SystemSettingsEvent {}

// ── Rapports ──────────────────────────────────────────────────────────────────
class GenerateAuditReport extends SystemSettingsEvent {}
class GenerateUsageReport extends SystemSettingsEvent {}
