"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _extends2=require("babel-runtime/helpers/extends"),_extends3=_interopRequireDefault(_extends2);exports.getOverflowOptions=getOverflowOptions,exports.default=getPlacements;var _placements=require("rc-tooltip/lib/placements");function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var autoAdjustOverflowEnabled={adjustX:1,adjustY:1},autoAdjustOverflowDisabled={adjustX:0,adjustY:0},targetOffset=[0,0];function getOverflowOptions(t){return"boolean"==typeof t?t?autoAdjustOverflowEnabled:autoAdjustOverflowDisabled:(0,_extends3.default)({},autoAdjustOverflowDisabled,t)}function getPlacements(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.arrowWidth,o=void 0===t?5:t,s=e.horizontalArrowShift,r=void 0===s?16:s,f=e.verticalArrowShift,l=void 0===f?12:f,n=e.autoAdjustOverflow,i=void 0===n||n,a={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(r+o),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(l+o)]},topRight:{points:["br","tc"],offset:[r+o,-4]},rightTop:{points:["tl","cr"],offset:[4,-(l+o)]},bottomRight:{points:["tr","bc"],offset:[r+o,4]},rightBottom:{points:["bl","cr"],offset:[4,l+o]},bottomLeft:{points:["tl","bc"],offset:[-(r+o),4]},leftBottom:{points:["br","cl"],offset:[-4,l+o]}};return Object.keys(a).forEach(function(t){a[t]=e.arrowPointAtCenter?(0,_extends3.default)({},a[t],{overflow:getOverflowOptions(i),targetOffset:targetOffset}):(0,_extends3.default)({},_placements.placements[t],{overflow:getOverflowOptions(i)})}),a}