import { FC } from "react";
import { Flex } from "@mantine/core";
import TagsTabHeader from "@/drawers/common/ProjectEditorDrawer/tabs/TagsTab/components/TagsTabHeader";
import TagsTable from "@/drawers/common/ProjectEditorDrawer/tabs/TagsTab/components/TagsTable";
import { DealTagsContextProvider } from "@/drawers/common/ProjectEditorDrawer/tabs/TagsTab/contexts/DealTagsContext";
import { ProjectSchema } from "@/lib/client";

type Props = {
    value: ProjectSchema;
};

const TagsTab: FC<Props> = ({ value }) => {
    return (
        <Flex
            h={"100%"}
            direction={"column"}
            gap={"xs"}>
            <DealTagsContextProvider project={value}>
                <TagsTabHeader />
                <TagsTable />
            </DealTagsContextProvider>
        </Flex>
    );
};

export default TagsTab;
