import AddIcon from '@mui/icons-material/Add' import VisibilityIcon from '@mui/icons-material/Visibility' import EditIcon from '@mui/icons-material/Edit' import RemoveIcon from '@mui/icons-material/Remove' import Box from '@mui/material/Box' import { PaperProps } from '@mui/material/Paper' import Tooltip from '@mui/material/Tooltip' import IconButton from '@mui/material/IconButton' import React, { FC } from 'react' import DrawerHeader from './Header' import baseControlProps from '../Controls/BaseProps' import languageMap from 'browser/I18N/keys' import { FormattedMessage } from 'react-intl' export interface EditorToolbarIconsProps { disabled?: boolean onAdd?: () => void addText?: string onEdit?: () => void editText?: string onRemove?: () => void removeText?: string onView?: () => void viewText?: string } export const EditorToolbarIcons: FC = ({ disabled = false, onAdd, addText = 'Add', onEdit, editText = 'Edit', onRemove, removeText = 'Remove', onView, viewText = 'View', }) => ( <> {onRemove ? ( } > ) : null} {onEdit ? ( ) : null} {onView ? ( ) : null} {onAdd ? ( } > ) : null} ) export const EditorToolbarShell: FC = ({ children, className = '', elevation = 7, ...props }) => ( {children} ) export interface EditorToolbarProps extends PaperProps, EditorToolbarIconsProps {} const EditorToolbar: FC = ({ children, className = '', disabled = false, elevation = 0, onAdd, addText = 'Add', onEdit, editText = 'Edit', onRemove, removeText = 'Remove', onView, viewText = 'View', ...props }) => { return ( {children} ) } export default EditorToolbar