import e from"../utils/getBasePlacement.js";import{placements as t,left as s,right as f,top as n}from"../enums.js";function r(t,r,a){var o=e(t),i=[s,n].indexOf(o)>=0?-1:1,p="function"==typeof a?a(Object.assign(Object.assign({},r),{},{placement:t})):a,m=p[0],u=p[1];return m=m||0,u=(u||0)*i,[s,f].indexOf(o)>=0?{x:u,y:m}:{x:m,y:u}}var a={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var s=e.state,f=e.options,n=e.name,a=f.offset,o=void 0===a?[0,0]:a,i=t.reduce((function(e,t){return e[t]=r(t,s.rects,o),e}),{}),p=i[s.placement],m=p.x,u=p.y;null!=s.modifiersData.popperOffsets&&(s.modifiersData.popperOffsets.x+=m,s.modifiersData.popperOffsets.y+=u),s.modifiersData[n]=i}};export default a;export{r as distanceAndSkiddingToXY};
//# sourceMappingURL=offset.js.map
