"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _amosTool = require("amos-tool"), _panelUid = _interopRequireDefault(require("./panelUid")), property = {
  firstCol: 0,
  secondCol: 3.5,
  width: 3.5,
  height: 7,
  minW: 3.5,
  maxW: 3.5,
  minH: 7,
  maxH: 7
}, dataFalcor = function(e, r) {
  return _amosTool.utils.isArray(r) || (r = [].concat(r)), r.map((function(r) {
    return r[e];
  }));
};

function _default() {
  var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = e.existPanelSize, a = void 0 === r ? 0 : r, t = e.cardOptions, i = void 0 === t ? {} : t, o = e.panelUID, l = a % 2 == 0 ? property.firstCol : property.secondCol, p = o || (0, 
  _panelUid.default)();
  return {
    uid: p,
    panelDataGrid: {
      i: p,
      x: l,
      y: 1 / 0,
      w: property.width,
      h: property.height,
      minW: property.minW,
      minH: property.minH,
      maxW: property.maxW,
      maxH: property.maxH,
      draggableHandle: ".triger-panel-darghandle",
      static: !1,
      isResizable: !1,
      isDraggable: !0
    },
    cardOptions: i
  };
}

exports.dataFalcor = dataFalcor;