import * as React from "react";

type Props = {
    noOffset?: boolean;
    addTopOffset?: boolean;
    addLeftOffset?: boolean;
    addRightOffset?: boolean;
    addHorizontalOffset?: boolean;
    cancelTopOffset?: boolean;
    cancelBottomOffset?: boolean;
    cancelHorizontalOffset?: boolean;
    accent?: boolean;
    condensed?: boolean;
    halfCondensed?: boolean;
    inline?: boolean;
    verticalAlign?: string | boolean;
    children?: React.ReactNode;
    className?: string,
    testAutomationId?: string;
    onClick?: Function;
    onKeyDown?: Function;
    onMouseDown?: Function;
    handleKeyDown?: boolean;
    preventDefaultKeyDown?: boolean;
} & Partial<DefaultProps>;

type DefaultProps = {
    noOffset: boolean;
    addTopOffset: boolean;
    addLeftOffset: boolean;
    addRightOffset: boolean;
    addHorizontalOffset: boolean;
    cancelTopOffset: boolean;
    cancelBottomOffset: boolean;
    cancelHorizontalOffset: boolean;
    accent: boolean;
    condensed: boolean;
    halfCondensed: boolean;
    inline: boolean;
    verticalAlign: boolean;
    // testAutomationId: null,
    // onClick: e => e,
    // onKeyDown: null,
    // onMouseDown: null,
    handleKeyDown: boolean;
    preventDefaultKeyDown: boolean;
}

export const KEY_ENTER = 13;
export const KEY_SPACE = 32;

export class Block extends React.Component<Props> {
    onKeyDown: (e) => void;
    onMouseDown: (e) => void;
}