// @flow
import type {PlatformsExpandedType} from '../constants/types/more'
import type {Proof, SimpleProofState, SimpleProofMeta} from '../constants/tracker'
import {Component} from 'react'

export type MissingProof = {
  type: PlatformsExpandedType,
  message: string,
  onClick: (missingProof: MissingProof) => void,
}

type CommonProps = {
  style?: Object,
  loadingStyle?: ?Object,
  loading?: boolean,
  username: ?string,
  onClickProofMenu?: ?(idx: number) => void,
  showingMenuIndex?: ?number,
}

export type Props = ({
  type: 'proofs',
  proofs: Array<Proof>,
} & CommonProps) | ({
  type: 'missingProofs',
  missingProofs: Array<MissingProof>,
} & CommonProps)

export default class ProofsRender extends Component<void, Props, void> {
  getRow: (idx: number) => React$Component<*,*,*>;
}
