import { Button, Dropdown, Select, Space } from 'antd' import { GlobalOutlined, LogoutOutlined, MenuOutlined, UserOutlined } from '@ant-design/icons' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import apiClient from '../../api/client' import { useAuthStore } from '../../stores/auth' interface HeaderProps { pageTitle: string onMenuToggle: () => void } export default function Header({ pageTitle, onMenuToggle }: HeaderProps) { const { t, i18n } = useTranslation() const navigate = useNavigate() const user = useAuthStore((s) => s.user) const clear = useAuthStore((s) => s.clear) const onLogout = async () => { try { await apiClient.post('/auth/logout') } catch { /* ignore */ } clear() navigate('/login', { replace: true }) } const onLangChange = (value: string) => { void i18n.changeLanguage(value) } return (