import Script from "next/script" import { env } from "@/env/server" import { CHATBOT_HIDE_ROUTES } from "@/components/ChatbotScript/constants" import { ChatbotRouteChange } from "@/components/ChatbotScript/RouteChange" import { getLang } from "@/i18n/serverContext" import { getPathname } from "@/utils/getPathname" export default async function ChatbotScript() { const lang = await getLang() const liveLangs = env.CHATBOT_LIVE_LANGS const pathName = await getPathname() const isLive = liveLangs.includes(lang) const shouldHideChatbot = CHATBOT_HIDE_ROUTES.some((route) => pathName.includes(route) ) return ( <> ) }