import 'package:flutter/material.dart';
import 'toast_type.dart';
import '../../../core/theme/design_tokens.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: AppColors.success,
      textColor: Color(0xFF065F46),
      icon: Icons.check_circle_outline,
    ),
    ToastType.warning => const ToastTypeConfig(
      backgroundColor: Color(0xFFFFFBEB),
      iconColor: AppColors.warning,
      textColor: Color(0xFF92400E),
      icon: Icons.warning_amber_rounded,
    ),
    ToastType.error => const ToastTypeConfig(
      backgroundColor: Color(0xFFFEF2F2),
      iconColor: AppColors.error,
      textColor: Color(0xFF991B1B),
      icon: Icons.error_outline,
    ),
    ToastType.info => const ToastTypeConfig(
      backgroundColor: Color(0xFFEFF6FF),
      iconColor: Color(0xFF3B82F6),
      textColor: Color(0xFF1E40AF),
      icon: Icons.info_outline,
    ),
  };
}
