import { Component, ComponentConfig } from '../components/Component'; import { Container, ContainerConfig } from '../components/Container'; import { FocusableContainer } from './FocusableContainer'; export type AnyComponent = Component; export type AnyContainer = Container; export type Callback = (data: T, target: AnyComponent, preventDefault: () => void) => boolean | void; export type NavigationCallback = Callback; export type ActionCallback = Callback; export type KeyMap = { [keyCode: number]: Action | Direction; }; export type Focusable = AnyComponent | FocusableContainer; export enum Direction { UP = 'up', DOWN = 'down', LEFT = 'left', RIGHT = 'right', } export enum Action { SELECT = 'select', BACK = 'back', }