import { FC } from "react";
import Link from "next/link";
import { IconChevronLeft, IconPlus } from "@tabler/icons-react";
import { Box, Group, Title } from "@mantine/core";
import useDealTagActions from "@/drawers/common/ProjectEditorDrawer/tabs/TagsTab/hooks/useDealTagActions";
import { ProjectSchema } from "@/lib/client";

type Props = {
    project: ProjectSchema;
};

const TagsPageHeader: FC<Props> = ({ project }) => {
    const { onCreateClick } = useDealTagActions();

    return (
        <Group
            mx={"xs"}
            mt={"md"}
            wrap={"nowrap"}
            justify={"space-between"}>
            <Link href={"/actions"}>
                <IconChevronLeft />
            </Link>
            <Title order={5}>Теги проекта "{project.name}"</Title>
            <Box onClick={onCreateClick}>
                <IconPlus />
            </Box>
        </Group>
    );
};

export default TagsPageHeader;
