// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT
import React from 'react';
import { Col } from 'antd/lib/grid';
import Icon from 'antd/lib/icon';
import Tooltip from 'antd/lib/tooltip';
import Popover from 'antd/lib/popover';
import {
FirstIcon,
BackJumpIcon,
PreviousIcon,
PreviousFilteredIcon,
PreviousEmptyIcon,
PlayIcon,
PauseIcon,
NextIcon,
NextFilteredIcon,
NextEmptyIcon,
ForwardJumpIcon,
LastIcon,
} from 'icons';
interface Props {
playing: boolean;
playPauseShortcut: string;
nextFrameShortcut: string;
previousFrameShortcut: string;
forwardShortcut: string;
backwardShortcut: string;
prevButtonType: string;
nextButtonType: string;
onSwitchPlay(): void;
onPrevFrame(): void;
onNextFrame(): void;
onForward(): void;
onBackward(): void;
onFirstFrame(): void;
onLastFrame(): void;
setPrevButton(type: 'regular' | 'filtered' | 'empty'): void;
setNextButton(type: 'regular' | 'filtered' | 'empty'): void;
}
function PlayerButtons(props: Props): JSX.Element {
const {
playing,
playPauseShortcut,
nextFrameShortcut,
previousFrameShortcut,
forwardShortcut,
backwardShortcut,
prevButtonType,
nextButtonType,
onSwitchPlay,
onPrevFrame,
onNextFrame,
onForward,
onBackward,
onFirstFrame,
onLastFrame,
setPrevButton,
setNextButton,
} = props;
const prevRegularText = 'Go back';
const prevFilteredText = 'Go back with a filter';
const prevEmptyText = 'Go back to an empty frame';
const nextRegularText = 'Go next';
const nextFilteredText = 'Go next with a filter';
const nextEmptyText = 'Go next to an empty frame';
let prevButton =