import 'package:flutter/material.dart';
import 'toast_type.dart';

class ToastTypeConfig {
  final Color backgroundColor;
  final Color iconColor;
  final Color textColor;
  final IconData icon;

  const ToastTypeConfig({
    required this.backgroundColor,
    required this.iconColor,
    required this.textColor,
    required this.icon,
  });

  static ToastTypeConfig fromType(ToastType type) => switch (type) {
    ToastType.success => const ToastTypeConfig(
      backgroundColor: Color(0xFFECFDF5),
      iconColor: Color(0xFF10B981),
      textColor: Color(0xFF065F46),
      icon: Icons.check_circle_outline,
    ),
    ToastType.warning => const ToastTypeConfig(
      backgroundColor: Color(0xFFFFFBEB),
      iconColor: Color(0xFFF59E0B),
      textColor: Color(0xFF92400E),
      icon: Icons.warning_amber_rounded,
    ),
    ToastType.error => const ToastTypeConfig(
      backgroundColor: Color(0xFFFEF2F2),
      iconColor: Color(0xFFEF4444),
      textColor: Color(0xFF991B1B),
      icon: Icons.error_outline,
    ),
    ToastType.info => const ToastTypeConfig(
      backgroundColor: Color(0xFFEFF6FF),
      iconColor: Color(0xFF3B82F6),
      textColor: Color(0xFF1E40AF),
      icon: Icons.info_outline,
    ),
  };
}
