import _extends from"babel-runtime/helpers/extends";import{placements as rcPlacements}from"rc-tooltip/es/placements";var autoAdjustOverflowEnabled={adjustX:1,adjustY:1},autoAdjustOverflowDisabled={adjustX:0,adjustY:0},targetOffset=[0,0];export function getOverflowOptions(t){return"boolean"==typeof t?t?autoAdjustOverflowEnabled:autoAdjustOverflowDisabled:_extends({},autoAdjustOverflowDisabled,t)};export default function getPlacements(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.arrowWidth,e=void 0===o?5:o,s=t.horizontalArrowShift,f=void 0===s?16:s,r=t.verticalArrowShift,i=void 0===r?12:r,n=t.autoAdjustOverflow,l=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:[-(f+e),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(i+e)]},topRight:{points:["br","tc"],offset:[f+e,-4]},rightTop:{points:["tl","cr"],offset:[4,-(i+e)]},bottomRight:{points:["tr","bc"],offset:[f+e,4]},rightBottom:{points:["bl","cr"],offset:[4,i+e]},bottomLeft:{points:["tl","bc"],offset:[-(f+e),4]},leftBottom:{points:["br","cl"],offset:[-4,i+e]}};return Object.keys(a).forEach(function(o){a[o]=t.arrowPointAtCenter?_extends({},a[o],{overflow:getOverflowOptions(l),targetOffset:targetOffset}):_extends({},rcPlacements[o],{overflow:getOverflowOptions(l)})}),a};