import { Group } from "@mantine/core";
import { useResiduesContext } from "../../contexts/ResiduesContext.tsx";
import useResiduesPdf from "../../hooks/useResiduesPdf.tsx";
import { IconQrcode } from "@tabler/icons-react";
import InlineButton from "../../../../components/InlineButton/InlineButton.tsx";


const ResiduesHeader = () => {
    const {
        onCreatePalletClick,
        onCreateBoxClick,
    } = useResiduesContext();

    const {
        onGetPalletsPdfClick,
    } = useResiduesPdf();

    return (
        <Group>
            <InlineButton onClick={() => onCreatePalletClick()}>
                Добавить паллет
            </InlineButton>
            <InlineButton onClick={() => onCreateBoxClick()}>
                Добавить короб
            </InlineButton>
            <InlineButton onClick={() => onGetPalletsPdfClick()}>
                <IconQrcode />
                Печать
            </InlineButton>
        </Group>
    );
};

export default ResiduesHeader;
