// @flow
import Avatar from './avatar'
import {Component} from 'react'
import type {Exact} from '../constants/types/more'
import type {IconType} from './icon'

export type Props = Exact<{
  style?: ?Object,
  styleTabBar?: Object,
  children?: Array<React$Element<ItemProps>>,
  tabBarOnBottom?: boolean,
  underlined?: boolean,
}>

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

export type ItemProps = Exact<{
  tabBarButton?: React$Element<*>,
  label?: string,
  selected: boolean,
  selectedColor?: string,
  onClick?: () => void,
  onPress?: void,
  style?: Object,
  styleContainer?: Object,
  children?: React$Element<*>,
  onBottom?: boolean,
  underlined?: boolean,
}>

export class TabBarItem extends Component<void, ItemProps, void> { }

export type TabBarButtonSource = {type: 'icon', icon: IconType} | {type: 'avatar', avatar: React$Element<*>} | {type: 'nav', icon: IconType}

export type TabBarButtonProps = Exact<{
  selected: boolean,
  onClick?: () => void,
  source: TabBarButtonSource,
  label?: string,
  badgeNumber?: ?number,
  style?: Object,
  styleContainer?: Object,
  styleBadge?: Object,
  styleIcon?: Object,
  styleBadgeNumber?: Object,
  styleLabel?: Object,
}>

export class TabBarButton extends Component<void, TabBarButtonProps, void> { }
