"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

var _reactGridLayout = _interopRequireDefault(require("react-grid-layout"));

var _reactSizeme = require("react-sizeme");

var _overView = _interopRequireDefault(require("./over-view"));

var _wordsCloud = _interopRequireDefault(require("./words-cloud"));

var _okrTarget = _interopRequireDefault(require("./okr-target"));

var _okrAlign = _interopRequireDefault(require("./okr-align"));

var _weekTask = _interopRequireDefault(require("./week-task"));

var _okrProgress = _interopRequireDefault(require("./okr-progress"));

var _personalInfo = _interopRequireDefault(require("./personal-info"));

var _subEmployeeOkr = _interopRequireDefault(require("./sub-employee-okr"));

var _nearVisitors = _interopRequireDefault(require("./near-visitors"));

require("./index.css");

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

function GridPage(_ref) {
  var editable = _ref.editable;
  var layout = [{
    i: "overview",
    x: 0,
    y: 0,
    w: 6,
    h: 4
  }, {
    i: "okrRisk",
    x: 6,
    y: 0,
    w: 6,
    h: 4
  }, {
    i: "userCard",
    x: 12,
    y: 0,
    w: 4,
    h: 4
  }, {
    i: "okrAlign",
    x: 0,
    y: 5,
    w: 6,
    h: 4
  }, {
    i: "okrProgress",
    x: 6,
    y: 5,
    w: 6,
    h: 4
  }, {
    i: "subAndPeerOkr",
    x: 12,
    y: 5,
    w: 4,
    h: 4
  }, {
    i: "weekTask",
    x: 0,
    y: 9,
    w: 6,
    h: 4
  }, {
    i: "wordcloud",
    x: 6,
    y: 9,
    w: 6,
    h: 4
  }, {
    i: "recentVisitor",
    x: 12,
    y: 9,
    w: 4,
    h: 4
  } // { i: "OkrEssay", x: 12, y: 10, w: 4, h: 10 }
  ];
  return /*#__PURE__*/_react["default"].createElement(_reactSizeme.SizeMe, null, function (_ref2) {
    var size = _ref2.size;
    return /*#__PURE__*/_react["default"].createElement(_reactGridLayout["default"], {
      className: (0, _classnames["default"])("tita-grid-page", {
        editing: editable
      }),
      layout: layout,
      cols: 16,
      rowHeight: (size.width || 0) / 16.8,
      measureBeforeMount: false,
      containerPadding: [0, 0],
      width: size.width,
      isDraggable: editable,
      isResizable: editable,
      style: {
        backgroundSize: "calc(6.25% + 0.625px) ".concat((size.width || 0) / 16.8 + 10, "px")
      },
      resizeHandle: !editable ? null : /*#__PURE__*/_react["default"].createElement("div", {
        className: "react-resizable-handle",
        style: {
          position: "absolute",
          right: 0,
          bottom: 0
        }
      }, "resize")
    }, /*#__PURE__*/_react["default"].createElement("div", {
      key: "overview",
      style: {
        position: "relative"
      }
    }, /*#__PURE__*/_react["default"].createElement(_overView["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "wordcloud"
    }, /*#__PURE__*/_react["default"].createElement(_wordsCloud["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "userCard"
    }, /*#__PURE__*/_react["default"].createElement(_personalInfo["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "okrRisk"
    }, /*#__PURE__*/_react["default"].createElement(_okrTarget["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "okrAlign"
    }, /*#__PURE__*/_react["default"].createElement(_okrAlign["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "subAndPeerOkr"
    }, /*#__PURE__*/_react["default"].createElement(_subEmployeeOkr["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "okrProgress"
    }, /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "weekTask"
    }, /*#__PURE__*/_react["default"].createElement(_weekTask["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
      key: "recentVisitor"
    }, /*#__PURE__*/_react["default"].createElement(_nearVisitors["default"], null)));
  });
}

var _default = GridPage;
exports["default"] = _default;