"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("react/jsx-runtime"),n=require("classnames"),i=require("react"),o=require("../Popover/Popover.js"),u=require("./MenuItem/MenuItem.js"),s=require("./MenuGroup/MenuGroup.js"),a=require("./MenuDivider/MenuDivider.js"),c=require("./Menu.scss.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=l(e),f=l(r),d=l(n),m=["className","children","containerRef","placement"];function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function b(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?v(Object(t),!0).forEach((function(r){p.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var j=function(e){var r=e.className,n=e.children,u=e.containerRef,s=e.placement,a=void 0===s?"bottom-start":s,l=f.default(e,m),p=i.useMemo((function(){var e=(null==a?void 0:a.startsWith("top"))||(null==a?void 0:a.startsWith("bottom")),t=(null==a?void 0:a.startsWith("left"))||(null==a?void 0:a.startsWith("right"));return d.default(c.root,e&&c.marginVertical,t&&c.marginHorizontal,r)}),[a,r]);return t.jsx(o.Popover,b(b({},l),{},{className:p,placement:a,type:"menu",children:t.jsx("div",{className:c.content,ref:u,children:n})}))};j.Item=u.MenuItem,j.Group=s.MenuGroup,j.Divider=a.MenuDivider;var O=j;exports.Menu=O;
//# sourceMappingURL=Menu.js.map
