import { Checkbox, FormControlLabel, Grid, Typography } from '@mui/material';

const Logs = ({ state = {}, handleChange = (name = '', val = '') => {} }) => {
	return (
		<Grid container spacing={1} flex mt={3} mb={3}>
			<Grid item flex={1} xs={4}>
				<Typography variant='subtitle1' fontWeight='bold'>
					Enable logs
				</Typography>
			</Grid>

			<Grid item flex={2} xs={8}>
				<FormControlLabel
					control={
						<Checkbox
							checked={state?.enable_logs || false}
							onChange={e => handleChange('enable_logs', e.target.checked)}
						/>
					}
					label='When checked, the Logs page will contain up to 25 of the most recent transactions.'
				/>
			</Grid>
		</Grid>
	);
};

export default Logs;
