import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { useTheme } from '../../contexts/theme';
const iconSize = 30;
const offset = 10;
const InfoTextBox = _ref => {
  let {
    children
  } = _ref;
  const {
    ColorPallet,
    TextTheme
  } = useTheme();
  const styles = StyleSheet.create({
    container: {
      backgroundColor: ColorPallet.notification.info,
      borderRadius: 5,
      borderWidth: 1,
      borderColor: ColorPallet.notification.infoBorder,
      padding: 10
    },
    row: {
      flexDirection: 'row',
      alignItems: 'center'
    },
    textContainer: {
      ...TextTheme.normal,
      color: ColorPallet.notification.infoText,
      fontWeight: 'bold',
      alignSelf: 'center',
      flexShrink: 1
    },
    iconContainer: {
      marginRight: offset,
      alignSelf: 'center'
    }
  });
  return /*#__PURE__*/React.createElement(View, {
    style: styles.container
  }, /*#__PURE__*/React.createElement(View, {
    style: styles.row
  }, /*#__PURE__*/React.createElement(View, {
    style: styles.iconContainer
  }, /*#__PURE__*/React.createElement(Icon, {
    name: 'info',
    size: iconSize,
    color: ColorPallet.notification.infoIcon
  })), typeof children === 'string' ? /*#__PURE__*/React.createElement(Text, {
    style: styles.textContainer
  }, children) : /*#__PURE__*/React.createElement(React.Fragment, null, children)));
};
export default InfoTextBox;
//# sourceMappingURL=InfoTextBox.js.map