import { useTranslation } from "react-i18next";
import styled from "styled-components";
import { constVoid } from "../../../Core/types";
import Box from "../../../Styled/Box";
import { RawButton } from "../../../Styled/Button";
import Icon from "../../../Styled/Icon";
import { StoryIcon } from "./StoryButtons";
import Text from "../../../Styled/Text";
interface FooterBarProps {
goPrev: constVoid;
goNext: constVoid;
jumpToStory: (index: number) => void;
zoomTo: constVoid;
currentHumanIndex: number;
totalStories: number;
listStories: () => void;
}
const FooterButton = styled(RawButton)`
display: flex;
align-items: center;
padding: 15px;
gap: 5px;
`;
const NavigationButton = styled(RawButton)`
display: flex;
align-items: center;
flex: 1;
padding: 15px 0;
gap: 10px;
`;
const FooterBar = ({
goPrev,
goNext,
jumpToStory,
zoomTo,
currentHumanIndex,
totalStories,
listStories
}: FooterBarProps) => {
const isEnd = currentHumanIndex === totalStories;
const { t } = useTranslation();
return (
<>
{totalStories > 1 && (
{t(($) => $.story.prev)}
)}
{currentHumanIndex} / {totalStories}
$.story.locationBtn)}>
{totalStories > 1 && (
jumpToStory(0) : goNext}
>
{isEnd ? (
<>
{t(($) => $.story.restart)}
>
) : (
<>
{t(($) => $.story.next)}
>
)}
)}
>
);
};
export default FooterBar;