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