
"use client";
import { HiMail, HiPhone } from "react-icons/hi";
import { BASE_WEB_URL } from "../Config/Constant";
import { usePage } from "@inertiajs/react";
function Topbar() {
    const { locale } = usePage().props;

    const changedLocale = (e) => {
        window.location.href = BASE_WEB_URL + "/change-language/" + e.target.value;
    }
    return (
        <div className="bg-gray-900 text-gray-200 px-2 ">
            <div className="container mx-auto flex justify-between items-center py-2">
                <select onChange={changedLocale} className="bg-gray-900 text-gray-200 border-0">
                    <option value="en" selected={locale === "en"}>English</option>
                    <option value="ps" selected={locale === "ps"}>Pashto</option>
                    <option value="dr" selected={locale === "dr"}>Dari</option>
                </select>
                <div className="">
                    <div className="flex"><HiMail className="me-1 h-6" />info@mohe.gov.af</div>
                    <div className="flex"><HiPhone className="me-1 h-6" />02089898</div>
                </div>
            </div>
        </div>
    );
}
export default Topbar;

