import { PinnedItems } from '@wordpress/interface';
import { Button } from '@wordpress/components';

import { scope } from './constants';

export default function Header( { hasUndo, undo, hasRedo, redo } ) {
		return (
				<div className="tipus-header">
						<div>
								<Button variant="secondary" disabled={ !hasUndo } onClick={ undo }>Undo</Button>
								<Button variant="secondary" disabled={ !hasRedo } onClick={ redo }>Redo</Button>
						</div>
						<div className="tipus-header__settings">
								<PinnedItems.Slot scope={ scope } />
						</div>
				</div>
		);
}
