import { useContext } from 'react' import { Flex, Button } from 'antd' import { ElectronContext } from '../context/ElectronContext' import XMarkIcon from '../../Icons/XMarkIcon' import MinusIcon from '../../Icons/MinusIcon' import ContractIcon from '../../Icons/ContractIcon' import ExpandIcon from '../../Icons/ExpandIcon' const DashboardWindowButtons = () => { const { isMaximized, handleWindowControl, platform, isFullScreen } = useContext(ElectronContext) const closeButton = ( } type={'text'} onClick={() => handleWindowControl('close')} /> ) const maximizeButton = ( } type={'text'} onClick={() => handleWindowControl('minimize')} /> ) const minimizeButton = ( : } type={'text'} onClick={() => handleWindowControl('maximize')} /> ) return ( {platform == 'darwin' ? ( isFullScreen == false ? ( ) : null ) : ( {maximizeButton} {minimizeButton} {closeButton} )} ) } export default DashboardWindowButtons