text: /*
   * @Author: czy0729
   * @Date: 2020-01-08 11:37:06
   * @Last Modified by: czy0729
   * @Last Modified time: 2020-01-09 17:50:00
   */
  import React from 'react'
  import { Alert, View } from 'react-native'
  import PropTypes from 'prop-types'
  import { observer } from 'mobx-react'
  import { IconHeader } from '@screens/_'
  import { _ } from '@stores'
  import { inject, withHeader } from '@utils/decorators'
  import { t } from '@utils/fetch'
  import { headerStyle } from '../styles'
  import StatusBarEvents from '../_/status-bar-events'
  import List from './list'
  import Store from './store'
  
  const title = '卖一推荐'
  
  export default
  @inject(Store)
  @withHeader({
    screen: title,
    hm: ['tinygrail/advance-ask', 'TinygrailAdvanceAsk'],
    ...headerStyle
  })
  @observer
  class TinygrailAdvanceAsk extends React.Component {
    static navigationOptions = {
      title
    }
  
    static contextTypes = {
      $: PropTypes.object,
      navigation: PropTypes.object
    }
  
    componentDidMount() {
      const { $, navigation } = this.context
      $.init()
  
      navigation.setParams({
        extra: (
          <IconHeader
            name='information'
            onPress={() => {
              t('卖一推荐.提示')
  
              Alert.alert(
                '当前计算方式',
                '从活跃列表里面查找\n第一卖单股数 > 10 且 股息 > 3\n股息 / 第一卖单价 * 10 = 分数',
                [
                  {
                    text: '知道了'
                  }
                ]
              )
            }}
          />
        )
      })
    }
  
    render() {
      return (
        <View
          style={[
            _.container.flex,
            {
              backgroundColor: _.colorTinygrailContainer
            }
          ]}
        >
          <StatusBarEvents />
          <List />
        </View>
      )
    }
  }
  