"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var React = _interopRequireWildcard(require("react"));

var _one = require("remax/one");

var _partTitle = _interopRequireDefault(require("../../part-title"));

var _switch = _interopRequireDefault(require("../../switch"));

var _index = _interopRequireDefault(require("../index"));

var _indexModule = _interopRequireDefault(require("./index.module.less"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

var customizeSkeleton = /*#__PURE__*/React.createElement(_one.View, {
  className: _indexModule.default.app
}, /*#__PURE__*/React.createElement(_one.View, {
  className: _indexModule.default.image
}), /*#__PURE__*/React.createElement(_one.View, {
  className: _indexModule.default.info
}, /*#__PURE__*/React.createElement(_one.View, {
  className: _indexModule.default.main
}, /*#__PURE__*/React.createElement(_one.View, {
  className: _indexModule.default.title
}), /*#__PURE__*/React.createElement(_one.View, {
  className: _indexModule.default.item
})), /*#__PURE__*/React.createElement(_one.View, {
  className: _indexModule.default.footer
}, /*#__PURE__*/React.createElement(_one.Text, {
  className: _indexModule.default.price
}), /*#__PURE__*/React.createElement(_one.Text, {
  className: _indexModule.default.cart
}))));

var _default = function _default() {
  var _useState = (0, React.useState)(false),
      _useState2 = _slicedToArray(_useState, 2),
      checked = _useState2[0],
      setChecked = _useState2[1];

  var _useState3 = (0, React.useState)(true),
      _useState4 = _slicedToArray(_useState3, 2),
      loading = _useState4[0],
      setLoading = _useState4[1];

  var handleChangeSwitch = function handleChangeSwitch(v) {
    setChecked(v);
    setLoading(!v);
  };

  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u57FA\u672C\u7528\u6CD5"), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_index.default, null)), /*#__PURE__*/React.createElement(_partTitle.default, null, "\u6807\u9898\u989C\u8272"), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_index.default, {
    titleColor: "rgba(255, 153, 153, 0.2)"
  })), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u65E0\u6807\u9898"), /*#__PURE__*/React.createElement(_index.default, {
    title: false
  })), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u6BB5\u843D"), /*#__PURE__*/React.createElement(_index.default, {
    paragraph: {
      rows: 4,
      width: [240, 'aut0', 'aut0', 200]
    }
  })), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u5934\u50CF"), /*#__PURE__*/React.createElement(_index.default, {
    avatar: true
  })), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u56FE\u7247"), /*#__PURE__*/React.createElement(_index.default, {
    avatar: true,
    image: true
  })), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u81EA\u5B9A\u4E49"), /*#__PURE__*/React.createElement(_index.default, {
    customize: customizeSkeleton
  })), /*#__PURE__*/React.createElement(_partTitle.default, null, "Fade"), /*#__PURE__*/React.createElement(_one.View, {
    style: {
      height: '200px'
    }
  }, /*#__PURE__*/React.createElement(_one.View, {
    className: _indexModule.default.action
  }, /*#__PURE__*/React.createElement(_switch.default, {
    value: checked,
    onChange: handleChangeSwitch
  })), /*#__PURE__*/React.createElement(_index.default, {
    fade: true,
    loading: loading
  }, /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_one.View, {
    className: _indexModule.default.content
  }, "Amazing!!!")))), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u8BBE\u7F6E\u91CD\u590D\uFF08\u5217\u8868\u52A0\u8F7D\u63A8\u8350\uFF09"), /*#__PURE__*/React.createElement(_index.default, {
    repetitions: 3
  })), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u8BBE\u7F6E\u95F4\u8DDD"), /*#__PURE__*/React.createElement(_index.default, {
    repetitions: 2,
    space: 50
  })), /*#__PURE__*/React.createElement(_one.View, null, /*#__PURE__*/React.createElement(_partTitle.default, null, "\u81EA\u5B9A\u4E49\u6837\u5F0F"), /*#__PURE__*/React.createElement(_index.default, {
    style: {
      padding: 10,
      borderRadius: 6,
      margin: '0 20px',
      backgroundColor: '#dcdbdb'
    }
  })));
};

exports.default = _default;