import { useCallback } from 'react'; // @mui import { DatePicker } from '@mui/x-date-pickers/DatePicker'; import Stack from '@mui/material/Stack'; import MenuItem from '@mui/material/MenuItem'; import TextField from '@mui/material/TextField'; import InputAdornment from '@mui/material/InputAdornment'; // types import { InvoiceTableFilters, InvoiceTableFilterValue } from 'mvpmasters-shared'; // components import Iconify from 'src/components/iconify'; import CustomPopover, { usePopover } from 'src/components/custom-popover'; // ---------------------------------------------------------------------- type Props = { filters: InvoiceTableFilters; onFilters: (name: string, value: InvoiceTableFilterValue) => void; // dateError: boolean; serviceOptions: string[]; }; export default function InvoiceTableToolbar({ filters, onFilters, // dateError, serviceOptions, }: Props) { const popover = usePopover(); const handleFilterName = useCallback( (event: React.ChangeEvent) => { onFilters('name', event.target.value); }, [onFilters] ); // const handleFilterService = useCallback( // (event: SelectChangeEvent) => { // onFilters( // 'service', // typeof event.target.value === 'string' ? event.target.value.split(',') : event.target.value // ); // }, // [onFilters] // ); const handleFilterStartDate = useCallback( (newValue: Date | null) => { onFilters('startDate', newValue); }, [onFilters] ); const handleFilterEndDate = useCallback( (newValue: Date | null) => { onFilters('endDate', newValue); }, [onFilters] ); return ( <> {/* Service */} ), }} /> {/* ), }} /> */} { popover.onClose(); }} > Print { popover.onClose(); }} > Import { popover.onClose(); }} > Export ); }