'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.initSplit = undefined;

var _split = require('split.js');

var _split2 = _interopRequireDefault(_split);

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

var initSplit = exports.initSplit = function initSplit(panes, options) {
  var defaults = {
    elementStyle: function elementStyle(dimension, size, gutterSize) {
      return {
        'flex-basis': 'calc(' + size + '% - ' + gutterSize + 'px)'
      };
    },
    gutterStyle: function gutterStyle(dimension, gutterSize) {
      return {
        'flex-basis': gutterSize + 'px'
      };
    },
    onDragEnd: function onDragEnd() {}
  };
  var splitOptions = Object.assign(defaults, options);
  var split = (0, _split2.default)(panes, splitOptions);
  return split;
};