import cn from 'clsx' import Link from 'next/link' import { FC, useState } from 'react' import { useRouter } from 'next/router' import s from './I18nWidget.module.css' import { Cross, ChevronRight } from '@components/icons' import ClickOutside from '@lib/click-outside' import Image from 'next/image' interface LOCALE_DATA { name: string img: { filename: string alt: string } } const LOCALES_MAP: Record = { it: { name: 'Italiano', img: { filename: 'flag-it.svg', alt: 'Bandiera Italia', }, }, en: { name: 'English', img: { filename: 'flag-en.svg', alt: 'UK Flag', }, }, } const I18nWidget: FC = () => { const [display, setDisplay] = useState(false) const { locale, locales, defaultLocale = 'it', asPath: currentPath, } = useRouter() const options = locales?.filter((val) => val !== locale) const currentLocale = locale || defaultLocale return ( setDisplay(false)}> ) } export default I18nWidget