"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _themed = require("@rneui/themed");
var _react = _interopRequireDefault(require("react"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
 * 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.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_themed.Header, {
    containerStyle: styles.header,
    rightComponent: /*#__PURE__*/_react.default.createElement(_themed.Text, null, /*#__PURE__*/_react.default.createElement(_themed.Icon, {
      onPress: onCloseClick,
      name: "close",
      type: "font-awesome"
    }))
  }), forecasts?.map((f, i) => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    key: i
  }, /*#__PURE__*/_react.default.createElement(_themed.ListItem, null, /*#__PURE__*/_react.default.createElement(_themed.ListItem.Content, null, /*#__PURE__*/_react.default.createElement(_themed.ListItem.Title, null, f.province, ":", f.city))), f.casts?.map((c, j) => /*#__PURE__*/_react.default.createElement(_themed.ListItem, {
    key: c.week
  }, /*#__PURE__*/_react.default.createElement(_themed.ListItem.Content, null, /*#__PURE__*/_react.default.createElement(_themed.ListItem.Title, null, c.date, ", ", c.dayweather, ", ", c.nightweather)))))));
};
var _default = exports.default = Detail;
const styles = _reactNative.StyleSheet.create({
  container: {
    position: 'absolute',
    right: 5,
    bottom: 20
  },
  header: {
    backgroundColor: '#fff'
  }
});
//# sourceMappingURL=Detail.js.map