import { Button, Stack } from "@mui/material";
import { useTranslation } from "react-i18next";

interface Props {
	isLoading: boolean;
	isValid: boolean;
	onCancel: () => void;
}

export function ReportBuilderActions(props: Props) {
	const { t } = useTranslation();

	return (
		<Stack direction="row" spacing={3}>
			<Button
				type="submit"
				variant="outlined"
				color="primary"
				disabled={!props.isValid || props.isLoading}
			>
				{t("buildReport")}
			</Button>
			<Button
				onClick={props.onCancel}
				variant="outlined"
				color="secondary"
				disabled={props.isLoading}
			>
				{t("resetForm")}
			</Button>
		</Stack>
	);
}
