import React, { Component } from 'react';
import { Image, StyleSheet, View } from 'react-native';
import { Button, SearchBar } from 'antd-mobile';
import chatsIcon from '../../../image/chats-icon.png';
import ListHouContent from './houseinfo/listhouse';
import { createAction } from '../../utils/index';


class fwInfo extends Component {
  static navigationOptions = {
    lazy: true,
    tabBarLabel: '房屋信息',
    title: '房屋信息',
    headerRight: <Button />,
    // Note: By default the icon is only shown on iOS. Search the showIcon option below.
    tabBarIcon: () => (
      <Image
        source={chatsIcon}
        style={[styles.icon]}
      />
    ),
  };
  state = {
    value: '美食',
  };

  render() {
    return (
      <View style={{ flex: 1 }}>
        <SearchBar
          value={this.state.value}
          placeholder="搜索"
          onSubmit={value => console.log(value, 'onSubmit')}
          onClear={value => console.log(value, 'onClear')}
          onFocus={() => console.log('onFocus')}
          onBlur={() => console.log('onBlur')}
          onCancel={() => console.log('onCancel')}
          onChange={(value) => {
            this.setState({
              value,
            });
          }}
        />
        <ListHouContent />
      </View>
    );
  }
}
const styles = StyleSheet.create({
  icon: {
    width: 26,
    height: 26,
  },
});
export default fwInfo;
