import { useState } from "react";

const languages: Language[] = ["Ru", "Eng"];

type Language = "Ru" | "Eng";

const LanguageSwitcher = () => {
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  const [language, setLanguage] = useState<Language>("Ru");

  const onLangClick = (lang: Language) => {
    return () => setLanguage(lang);
  };

  return (
    <div className="flex gap-[20px] px-[10px]">
      {languages.map((lang) => (
        <button
          onClick={onLangClick(lang)}
          key={lang}
          className="h-fit my-auto "
        >
          {lang}
        </button>
      ))}
    </div>
  );
};

export default LanguageSwitcher;
