import {Button, CircularProgress} from "@mui/material";
import {useTranslations} from "next-intl";
import {useState} from "react";
import useRequest from "@/lib/app/hooks/useRequest";
import DescriptionIcon from '@mui/icons-material/Description';
import Link from "next/link";

const PrintHistory = ({attachment}) => {
    const t = useTranslations();

    return (
        <Button
            color="primary"
            variant="contained"
            size="small"
            component={Link}
            href={attachment.file}
            target="_blank"
            sx={{ textTransform: "unset", alignSelf: "center", mx: 0.25 }}
        >
            {attachment.title}
        </Button>
    );
}

export default PrintHistory