import { View, StyleSheet } from 'react-native';
import { Header, Icon, ListItem, Text } from '@rneui/themed';
import React from 'react';
/**
 * Detail props
 *
 * @category Props
 */

/**
  @category Component
 */
const Detail = props => {
  const {
    onClose
  } = props;
  const {
    forecasts
  } = props.data;
  const onCloseClick = () => {
    onClose?.({
      data: props.data
    });
  };
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Header, {
    containerStyle: styles.header,
    rightComponent: /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement(Icon, {
      onPress: onCloseClick,
      name: "close",
      type: "font-awesome"
    }))
  }), forecasts?.map((f, i) => /*#__PURE__*/React.createElement(View, {
    key: i
  }, /*#__PURE__*/React.createElement(ListItem, null, /*#__PURE__*/React.createElement(ListItem.Content, null, /*#__PURE__*/React.createElement(ListItem.Title, null, f.province, ":", f.city))), f.casts?.map((c, j) => /*#__PURE__*/React.createElement(ListItem, {
    key: c.week
  }, /*#__PURE__*/React.createElement(ListItem.Content, null, /*#__PURE__*/React.createElement(ListItem.Title, null, c.date, ", ", c.dayweather, ", ", c.nightweather)))))));
};
export default Detail;
const styles = StyleSheet.create({
  container: {
    position: 'absolute',
    right: 5,
    bottom: 20
  },
  header: {
    backgroundColor: '#fff'
  }
});
//# sourceMappingURL=Detail.js.map