// @flow
import {Component} from 'react'

export type MenuItem = {
  title: string, // Only used as ID if view is provided for Header
  view?: React$Element<*>, // Only used for Header
  subTitle?: string, // subTitle is not used on native
  danger?: boolean,
  onClick?: () => void,
  onPress?: void,
  style?: Object,
}

export type Props = {
  items: Array<MenuItem | 'Divider' | null>, // Divider is not used on native
  header?: MenuItem,
  onHidden: () => void,
  style?: Object,
}

export type HeaderTextProps = {
  color: string,
  backgroundColor: string,
  style?: Object,
  children?: React$Element<*>,
}

class PopupHeaderText extends Component<void, HeaderTextProps, void> {}
export {PopupHeaderText}

declare export default class PopupMenu extends Component<void, Props, void> {}
