"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.positionPropToPopperPosition = positionPropToPopperPosition;
var _POSITION_ATTRIBUTE_ENUM = require("./POSITION_ATTRIBUTE_ENUM");
var positionMap = {
  'top left': {
    position: 'top-start',
    animation: 'top'
  },
  'top center': {
    position: 'top',
    animation: 'top'
  },
  'top right': {
    position: 'top-end',
    animation: 'top'
  },
  'right top': {
    position: 'right-start',
    animation: 'right'
  },
  'right middle': {
    position: 'right',
    animation: 'right'
  },
  'right bottom': {
    position: 'right-end',
    animation: 'right'
  },
  'bottom left': {
    position: 'bottom-start',
    animation: 'bottom'
  },
  'bottom center': {
    position: 'bottom',
    animation: 'bottom'
  },
  'bottom right': {
    position: 'bottom-end',
    animation: 'bottom'
  },
  'left top': {
    position: 'left-start',
    animation: 'left'
  },
  'left middle': {
    position: 'left',
    animation: 'left'
  },
  'left bottom': {
    position: 'left-end',
    animation: 'left'
  }
};
function positionToPopper(position) {
  return position && positionMap[position] ? positionMap[position].position : null;
}
function positionPropToPopperPosition(position) {
  return positionToPopper(position) || positionMap[_POSITION_ATTRIBUTE_ENUM.POSITION_ATTRIBUTE_ENUM.default].position;
}
// eslint-disable-next-line @atlaskit/editor/no-re-export