import { Activity, Building2, Package as PackageIcon, PowerOff, Snowflake, UserMinus, Users, Sparkles } from 'lucide-react';

export const bgColor = (title: string) => {
    const status =
        title === 'Active Users' || title === 'active' || title === 'Total Contacts' || title === 'Active Contacts'
            ? 'active'
            : title === 'Inactive Users' || title === 'inactive' || title === 'Inactive Contacts' || title === 'Inactive Packages'
              ? 'inactive'
              : title === 'Invited Users' || title === 'freezed' || title === 'Linked Contacts'
                ? 'freezed'
                : title === 'Deleted Users' || title === 'terminated' || title === 'Unlinked Contacts'
                  ? 'terminated'
                  : title === 'Total Tenants'
                    ? 'tenants'
                    : title === 'Total Packages' || title === 'Active Packages'
                      ? 'packages'
                      : title === 'Total Features'
                        ? 'features'
                        : title === 'Pending Jobs'
                          ? 'jobs'
                          : 'active';
    switch (status) {
        case 'active':
            return {
                bg: 'bg-green-100',
                icons: 'text-green-600',
                icon: Users,
            };
        case 'inactive':
            return {
                bg: 'bg-purple-100',
                icons: 'text-purple-600',
                icon: UserMinus,
            };
        case 'freezed':
            return {
                bg: 'bg-blue-100',
                icons: 'text-blue-600',
                icon: Snowflake,
            };
        case 'terminated':
            return {
                bg: 'bg-red-100',
                icons: 'text-red-600',
                icon: PowerOff,
            };
        case 'tenants':
            return {
                bg: 'bg-indigo-100',
                icons: 'text-indigo-600',
                icon: Building2,
            };
        case 'packages':
            return {
                bg: 'bg-emerald-100',
                icons: 'text-emerald-600',
                icon: PackageIcon,
            };
        case 'jobs':
            return {
                bg: 'bg-amber-100',
                icons: 'text-amber-600',
                icon: Activity,
            };
        case 'features':
            return {
                bg: 'bg-pink-100',
                icons: 'text-pink-600',
                icon: Sparkles,
            };
        default:
            return {
                bg: 'bg-gray-100',
                icons: 'text-gray-600',
                icon: Users,
            };
    }
};
