import React from 'react'
import {
  GridToolbarContainer,
  GridToolbarFilterButton,
  GridToolbarColumnsButton,
  GridToolbarExport
} from '@mui/x-data-grid'
import { Button } from '@mui/material'
import { FaCloudUploadAlt } from 'react-icons/fa'

const CustomBar = ({ onImport }) => {
  return (
    <GridToolbarContainer>
      <GridToolbarColumnsButton />
      <GridToolbarFilterButton />
      {/* Custom import button */}
      <Button
        variant="contained"
        color="inherit"
        startIcon={<FaCloudUploadAlt />}
        onClick={onImport}
      >
        Importer
      </Button>
      <GridToolbarExport />
    </GridToolbarContainer>
  )
}

export default CustomBar
