import { prefix } from './prefix';
export var TopCenter = function (_a) {
    var contentRect = _a.contentRect, relativeRect = _a.relativeRect, cushion = _a.cushion;
    var right = relativeRect.right, left = relativeRect.left, top = relativeRect.top;
    var middle = (left + right) / 2;
    var x = middle - contentRect.width / 2;
    var y = top - contentRect.height - cushion;
    return {
        style: {
            position: 'absolute',
            left: x,
            top: y,
        },
        className: prefix('position-top-center'),
    };
};
