/**
 * React Native Full App (https://store.enappd.com/product/react-native-full-app)
 *
 * Copyright © 2019-present Enappd. All rights reserved.
 *
 * This source code is licensed as per the terms found in the
 * LICENSE.md file in the root directory of this source tree.
 */
import React, { Component } from 'react';
import { Textarea, View, Fab, Item, Icon } from 'native-base';
import styles from './style';

const ChatInputView = (props: any) => {
  return (
    <View style={styles.parentSection}>
      <Item rounded style={styles.textareaParent}>
        <Textarea
          rowSpan={1}
          style={styles.textAreaSection}
          placeholder="Type a Message"
          onChangeText={($event) => props.textChange($event)}
          value={props.chatInput}
        />
      </Item>
      <Fab style={styles.sendButton} onPress={props.updateData}>
        <Icon name="send" />
      </Fab>
    </View>
  );
};

export default ChatInputView;
