import { useState, useEffect, useCallback } from 'react'; import { useNavigate } from 'react-router'; import { useTranslation } from 'react-i18next'; import { useCurrency } from '../hooks/useCurrency'; import { adminUsersApi, type UserListItem, type UsersStatsResponse } from '../api/adminUsers'; import { usePlatform } from '../platform/hooks/usePlatform'; // ============ Icons ============ const BackIcon = () => ( ); const SearchIcon = () => ( ); const ChevronLeftIcon = () => ( ); const ChevronRightIcon = () => ( ); const RefreshIcon = ({ className = 'w-5 h-5' }: { className?: string }) => ( ); const TelegramIcon = () => ( ); // ============ Components ============ interface StatCardProps { title: string; value: string | number; subtitle?: string; color: 'blue' | 'green' | 'yellow' | 'red' | 'purple'; } function StatCard({ title, value, subtitle, color }: StatCardProps) { const colors = { blue: 'bg-accent-500/20 text-accent-400 border-accent-500/30', green: 'bg-success-500/20 text-success-400 border-success-500/30', yellow: 'bg-warning-500/20 text-warning-400 border-warning-500/30', red: 'bg-error-500/20 text-error-400 border-error-500/30', purple: 'bg-accent-500/20 text-accent-400 border-accent-500/30', }; return (
{t('admin.users.subtitle')}