import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import Link from "../link";
import Dropdown from "../dropdown";
import { useLang, useGetLang } from "../../../../hooks/locale";
const Links = () => {
    const switchLang = useLang();
    const lang = useGetLang();
    const selectedLang = React.useMemo(() => {
        return lang === "zh" ? "中文" : "EN";
    }, [lang]);
    return (_jsxs(Dropdown, { heading: selectedLang, width: "55px", itemsCenter: true, children: [lang !== "en" ? (_jsx(Link, { href: "", onClick: (e) => {
                    e.preventDefault();
                    switchLang("en");
                }, children: "EN" })) : null, lang !== "zh" ? (_jsx(Link, { href: "", onClick: (e) => {
                    e.preventDefault();
                    switchLang("zh");
                }, children: "\u4E2D\u6587" })) : null] }));
};
export default Links;
//# sourceMappingURL=index.js.map