'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');

var getResizeDirections = function getResizeDirections(directions) {
  if (!directions) {
    return {
      top: true,
      right: true,
      bottom: true,
      left: true,
      topRight: true,
      bottomRight: true,
      bottomLeft: true,
      topLeft: true
    };
  }
  var result = {
    top: false,
    right: false,
    bottom: false,
    left: false,
    topRight: false,
    bottomRight: false,
    bottomLeft: false,
    topLeft: false
  };
  var _iterator = _rollupPluginBabelHelpers.createForOfIteratorHelper(directions),
    _step;
  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var dir = _step.value;
      switch (dir) {
        case 'top':
          result.top = true;
          break;
        case 'right':
          result.right = true;
          break;
        case 'bottom':
          result.bottom = true;
          break;
        case 'left':
          result.left = true;
          break;
        case 'top-right':
          result.topRight = true;
          break;
        case 'top-left':
          result.topLeft = true;
          break;
        case 'bottom-right':
          result.bottomRight = true;
          break;
        case 'bottom-left':
          result.bottomLeft = true;
          break;
        default:
          break;
      }
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }
  return result;
};

exports.getResizeDirections = getResizeDirections;
