import 'package:flutter/material.dart';

enum AppThemeMode {
  light('light', 'Chiaro', ThemeMode.light, Icons.light_mode),
  dark('dark', 'Scuro', ThemeMode.dark, Icons.dark_mode),
  system('system', 'Sistema', ThemeMode.system, Icons.brightness_auto);

  const AppThemeMode(this.value, this.label, this.themeMode, this.icon);
  final String value;
  final String label;
  final ThemeMode themeMode;
  final IconData icon;

  static AppThemeMode fromValue(String? value) {
    return AppThemeMode.values.firstWhere(
      (e) => e.value == value,
      orElse: () => AppThemeMode.system,
    );
  }
}

enum PrefKeys {
  theme('themeModeSetting'),
  lastStore('lastStore');

  const PrefKeys(this.value);
  final String value;
}
