import React from 'react';
import { Popover as Popover$1, PopoverTrigger, Portal, Box, PopoverContent, PopoverArrow, PopoverBody } from '@chakra-ui/react';

var Popover = function (_a) {
    var content = _a.content, children = _a.children, placement = _a.placement, _b = _a.trigger, trigger = _b === void 0 ? 'hover' : _b, _c = _a.showArrow, showArrow = _c === void 0 ? true : _c, _d = _a.closeOnBlur, closeOnBlur = _d === void 0 ? false : _d, _e = _a.gutter, gutter = _e === void 0 ? 12 : _e, _f = _a.size, size = _f === void 0 ? 'md' : _f, onClose = _a.onClose, onOpen = _a.onOpen, isOpen = _a.isOpen, _g = _a.contentPadding, contentPadding = _g === void 0 ? '2xl' : _g, _h = _a.maxWidth, maxWidth = _h === void 0 ? '6xl' : _h, contentPosition = _a.contentPosition;
    return (React.createElement(Popover$1, { placement: placement, closeOnBlur: closeOnBlur, trigger: trigger, arrowSize: 12, gutter: gutter, size: size, onClose: onClose, onOpen: onOpen, isOpen: isOpen, isLazy: true },
        React.createElement(PopoverTrigger, null, children),
        React.createElement(Portal, null,
            React.createElement(Box, { zIndex: "popover", position: contentPosition, top: "0", left: "0" },
                React.createElement(PopoverContent, { borderRadius: "sm", boxShadow: "md", maxW: maxWidth, 
                    // required for arrow to popup above shadow
                    zIndex: "0", backgroundColor: "white", padding: contentPadding },
                    showArrow ? React.createElement(PopoverArrow, { backgroundColor: "white" }) : null,
                    React.createElement(PopoverBody, null, content))))));
};

export { Popover as default };
//# sourceMappingURL=index.js.map
