"use client";

import {
    UsersIcon,
    CurrencyDollarIcon,
    ChartPieIcon,
    ArrowTrendingUpIcon,
} from '@heroicons/react/24/outline';

export default function CRMPage() {
    const stats = [
        { name: 'Leads Totais', value: '124', icon: UsersIcon, color: 'blue' },
        { name: 'Oportunidades', value: 'R$ 450k', icon: CurrencyDollarIcon, color: 'green' },
        { name: 'Taxa de Conversão', value: '24%', icon: ChartPieIcon, color: 'purple' },
        { name: 'Crescimento', value: '+12%', icon: ArrowTrendingUpIcon, color: 'orange' },
    ];

    return (
        <div className="p-6 h-full overflow-auto">
            <div className="space-y-6">
                <div>
                    <h1 className="text-2xl font-bold text-gray-900 dark:text-white">
                        Mission Control (CRM)
                    </h1>
                    <p className="mt-1 text-sm text-gray-600 dark:text-gray-400">
                        Visão geral do relacionamento com clientes
                    </p>
                </div>

                <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
                    {stats.map((stat) => {
                        const Icon = stat.icon;
                        return (
                            <div
                                key={stat.name}
                                className="group relative overflow-hidden rounded-xl bg-white dark:bg-gray-900 p-4 border border-gray-200 dark:border-gray-800 transition-all"
                            >
                                <div className="flex items-center justify-between">
                                    <div>
                                        <p className="text-xs font-medium text-gray-600 dark:text-gray-400">
                                            {stat.name}
                                        </p>
                                        <p className="mt-1 text-2xl font-bold text-gray-900 dark:text-white">
                                            {stat.value}
                                        </p>
                                    </div>
                                    <div
                                        className={`rounded-lg p-2 bg-${stat.color}-100 dark:bg-${stat.color}-900/20`}
                                    >
                                        <Icon
                                            className={`h-5 w-5 text-${stat.color}-600 dark:text-${stat.color}-400`}
                                        />
                                    </div>
                                </div>
                            </div>
                        );
                    })}
                </div>

                <div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
                    <div className="rounded-xl bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 p-6 h-64 flex items-center justify-center">
                        <p className="text-gray-500">Funil de Vendas (Em breve)</p>
                    </div>
                    <div className="rounded-xl bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-800 p-6 h-64 flex items-center justify-center">
                        <p className="text-gray-500">Atividades Recentes (Em breve)</p>
                    </div>
                </div>
            </div>
        </div>
    );
}
