2023-09-08 10:57:21 +03:00
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { AiOutlineLoading3Quarters } from "react-icons/ai";
|
|
|
|
|
2024-01-31 00:34:32 +03:00
|
|
|
import { ChatInput } from "./components";
|
2023-09-05 11:49:29 +03:00
|
|
|
import { useActionBar } from "./hooks/useActionBar";
|
2023-09-28 12:29:55 +03:00
|
|
|
|
2023-09-29 11:24:31 +03:00
|
|
|
export const ActionsBar = (): JSX.Element => {
|
2024-01-31 00:34:32 +03:00
|
|
|
const { hasPendingRequests } = useActionBar();
|
2023-09-05 11:49:29 +03:00
|
|
|
|
2023-09-12 18:44:15 +03:00
|
|
|
const { t } = useTranslation(["chat"]);
|
2023-09-08 10:57:21 +03:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{hasPendingRequests && (
|
2023-10-04 17:26:56 +03:00
|
|
|
<div className="flex mt-1 flex-col md:flex-row w-full shadow-md dark:shadow-primary/25 hover:shadow-xl transition-shadow rounded-xl bg-white dark:bg-black border border-black/10 dark:border-white/25 p-2 md:p-6 pl-6 mb-3">
|
2023-09-15 02:09:26 +03:00
|
|
|
<div className="flex flex-1 items-center mb-2 md:mb-0">
|
2023-09-18 22:28:07 +03:00
|
|
|
<span className="text-sm md:text-1xl">{t("feedingBrain")}</span>
|
2023-09-08 10:57:21 +03:00
|
|
|
</div>
|
2023-09-15 02:09:26 +03:00
|
|
|
<AiOutlineLoading3Quarters className="animate-spin text-2xl md:text-3xl self-center" />
|
2023-09-05 11:49:29 +03:00
|
|
|
</div>
|
|
|
|
)}
|
2023-09-08 10:57:21 +03:00
|
|
|
|
2023-09-27 16:39:04 +03:00
|
|
|
<div>
|
2024-01-31 00:34:32 +03:00
|
|
|
<ChatInput />
|
2023-09-05 11:49:29 +03:00
|
|
|
</div>
|
2023-09-08 10:57:21 +03:00
|
|
|
</>
|
2023-08-11 11:06:20 +03:00
|
|
|
);
|
|
|
|
};
|