import PropTypes from 'prop-types' // material-ui import { IconButton, Box, OutlinedInput, Toolbar, Typography } from '@mui/material' import { useTheme } from '@mui/material/styles' import { StyledFab } from '@/ui-component/button/StyledFab' // icons import { IconSearch, IconArrowLeft, IconEdit } from '@tabler/icons' const ViewHeader = ({ children, filters = null, onSearchChange, search, searchPlaceholder = 'Search', title, description, isBackButton, onBack, isEditButton, onEdit }) => { const theme = useTheme() return ( {isBackButton && ( )} {title} {description && ( {description} )} {isEditButton && ( )} {search && ( } type='search' /> )} {filters} {children} ) } ViewHeader.propTypes = { children: PropTypes.node, filters: PropTypes.node, onSearchChange: PropTypes.func, search: PropTypes.bool, searchPlaceholder: PropTypes.string, title: PropTypes.string, description: PropTypes.string, isBackButton: PropTypes.bool, onBack: PropTypes.func, isEditButton: PropTypes.bool, onEdit: PropTypes.func } export default ViewHeader