"use client"; import { Box, Button } from "@mui/material"; import { useTranslation } from "react-i18next"; export type StockInLineActionStyle = { label: string; color: string; }; type Props = { btnSx: StockInLineActionStyle; onPrimaryClick: () => void; canEmail: boolean; canPrint: boolean; canDelete: boolean; onEmail: () => void; onPrint: () => void; onDelete: () => void; btnIsLoading: boolean; isDeleting: boolean; }; export default function StockInLineRowActions({ btnSx, onPrimaryClick, canEmail, canPrint, canDelete, onEmail, onPrint, onDelete, btnIsLoading, isDeleting, }: Props) { const { t } = useTranslation("purchaseOrder"); const buttonSx = { whiteSpace: "nowrap" as const, fontSize: 14, px: 1.5, py: 0.75, minHeight: 34, width: "100%", justifyContent: "center", }; return ( e.stopPropagation()} > {canEmail && ( )} {canPrint && ( )} {canDelete && ( )} ); }