webpackHotUpdate("index",{

/***/ "./src/pages/gallery.jsx":
/*!*******************************!*\
  !*** ./src/pages/gallery.jsx ***!
  \*******************************/
/*! exports provided: Gallery, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__react_refresh_utils__) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Gallery\", function() { return Gallery; });\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _hippy_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @hippy/react */ \"../../packages/hippy-react/dist/index.js\");\n/* harmony import */ var _routes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../routes */ \"./src/routes.js\");\n__webpack_require__.$Refresh$.runtime = __webpack_require__(/*! ./node_modules/react-refresh/runtime.js */ \"./node_modules/react-refresh/runtime.js\");\n\n\n\n\n\n\n\n\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\n\n\n\n\nvar SKIN_COLOR = {\n  mainLight: '#4c9afa',\n  otherLight: '#f44837',\n  textWhite: '#fff'\n};\nvar styles = _hippy_react__WEBPACK_IMPORTED_MODULE_9__[\"StyleSheet\"].create({\n  rowContainer: {\n    alignItems: 'center'\n  },\n  buttonView: {\n    borderColor: SKIN_COLOR.mainLight,\n    borderWidth: 2,\n    borderRadius: 8,\n    justifyContent: 'center',\n    alignItems: 'center',\n    width: 250,\n    height: 50,\n    marginTop: 30\n  },\n  buttonText: {\n    fontSize: 20,\n    color: SKIN_COLOR.mainLight,\n    textAlign: 'center',\n    textAlignVertical: 'center'\n  }\n});\nvar Gallery = /*#__PURE__*/function (_Component) {\n  _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Gallery, _Component);\n\n  var _super = _createSuper(Gallery);\n\n  function Gallery(props) {\n    var _this;\n\n    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Gallery);\n\n    _this = _super.call(this, props);\n    _this.state = {\n      pressItem: '',\n      dataSource: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(_routes__WEBPACK_IMPORTED_MODULE_10__[\"default\"])\n    };\n    _this.renderRow = _this.renderRow.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\n    _this.getRowType = _this.getRowType.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\n    _this.getRowKey = _this.getRowKey.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\n    _this.clickTo = _this.clickTo.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this));\n    return _this;\n  }\n\n  _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Gallery, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var history = this.props.history;\n\n      if (_hippy_react__WEBPACK_IMPORTED_MODULE_9__[\"Platform\"].OS === 'android') {\n        _hippy_react__WEBPACK_IMPORTED_MODULE_9__[\"BackAndroid\"].addListener(function () {\n          console.log('BackAndroid');\n\n          if (history.index === 0) {\n            history.goBack();\n            return true;\n          }\n\n          return false;\n        });\n      }\n    }\n  }, {\n    key: \"getRowType\",\n    value: function getRowType(index) {\n      var dataSource = this.state.dataSource;\n      var item = dataSource[index];\n      return item.meta.style;\n    }\n  }, {\n    key: \"getRowKey\",\n    value: function getRowKey(index) {\n      var dataSource = this.state.dataSource;\n      var item = dataSource[index];\n      return item.path || \"\".concat(index);\n    }\n  }, {\n    key: \"feedback\",\n    value: function feedback(itemId) {\n      var pressItem = itemId || '';\n      this.setState({\n        pressItem\n      });\n    }\n  }, {\n    key: \"clickTo\",\n    value: function clickTo(pageId) {\n      var history = this.props.history;\n      history.push(pageId);\n    }\n  }, {\n    key: \"renderRow\",\n    value: function renderRow(index) {\n      var _this2 = this;\n\n      var _this$state = this.state,\n          dataSource = _this$state.dataSource,\n          pressItem = _this$state.pressItem;\n      var rowData = dataSource[index];\n      var styleType = rowData.meta.style;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_hippy_react__WEBPACK_IMPORTED_MODULE_9__[\"View\"], {\n        style: styles.rowContainer\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_hippy_react__WEBPACK_IMPORTED_MODULE_9__[\"View\"], {\n        onPressIn: function onPressIn() {\n          return _this2.feedback(rowData.path);\n        },\n        onPressOut: function onPressOut() {\n          return _this2.feedback();\n        },\n        onClick: function onClick() {\n          return _this2.clickTo(rowData.path);\n        },\n        style: [styles.buttonView, {\n          borderColor: styleType === 1 ? SKIN_COLOR.mainLight : SKIN_COLOR.otherLight,\n          opacity: pressItem === rowData.path ? 0.5 : 1\n        }]\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_hippy_react__WEBPACK_IMPORTED_MODULE_9__[\"Text\"], {\n        style: [styles.buttonText, {\n          color: styleType === 1 ? SKIN_COLOR.mainLight : SKIN_COLOR.otherLight\n        }]\n      }, rowData.name)));\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var dataSource = this.state.dataSource;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_hippy_react__WEBPACK_IMPORTED_MODULE_9__[\"ListView\"], {\n        style: {\n          flex: 1,\n          backgroundColor: '#ffffff'\n        },\n        numberOfRows: dataSource.length,\n        renderRow: this.renderRow,\n        getRowType: this.getRowType,\n        getRowKey: this.getRowKey\n      });\n    }\n  }]);\n\n  return Gallery;\n}(react__WEBPACK_IMPORTED_MODULE_7__[\"Component\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (_c = Object(react_router_dom__WEBPACK_IMPORTED_MODULE_8__[\"withRouter\"])(Gallery));\n\nvar _c;\n\n__webpack_require__.$Refresh$.register(_c, \"%default%\");\n\nvar $ReactRefreshModuleId$ = __webpack_require__.$Refresh$.moduleId;\nvar $ReactRefreshCurrentExports$ = __react_refresh_utils__.getModuleExports(\n\t$ReactRefreshModuleId$\n);\n\nfunction $ReactRefreshModuleRuntime$(exports) {\n\tif (true) {\n\t\tvar errorOverlay;\n\t\tif (true) {\n\t\t\terrorOverlay = false;\n\t\t}\n\t\tvar testMode;\n\t\tif (typeof __react_refresh_test__ !== 'undefined') {\n\t\t\ttestMode = __react_refresh_test__;\n\t\t}\n\t\treturn __react_refresh_utils__.executeRuntime(\n\t\t\texports,\n\t\t\t$ReactRefreshModuleId$,\n\t\t\tmodule.hot,\n\t\t\terrorOverlay,\n\t\t\ttestMode\n\t\t);\n\t}\n}\n\nif (typeof Promise !== 'undefined' && $ReactRefreshCurrentExports$ instanceof Promise) {\n\t$ReactRefreshCurrentExports$.then($ReactRefreshModuleRuntime$);\n} else {\n\t$ReactRefreshModuleRuntime$($ReactRefreshCurrentExports$);\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@hippy/hippy-react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js */ \"./node_modules/@hippy/hippy-react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64, \n//# sourceURL=webpack-internal:///./src/pages/gallery.jsx\n");

/***/ })

})