/*! For license information please see menus.js.LICENSE.txt */
!function(){"use strict";var e={"./packages/packages/libs/menus/src/action.tsx":function(e,t,n){n.r(t),n.d(t,{default:function(){return Action}});var r=n("react"),c=n("@elementor/ui");const o="tiny";function Action({title:e,visible:t=!0,icon:n,onClick:i}){return t?r.createElement(c.Tooltip,{placement:"top",title:e,arrow:!0},r.createElement(c.IconButton,{"aria-label":e,size:o,onClick:i},r.createElement(n,{fontSize:o}))):null}},"./packages/packages/libs/menus/src/controls-actions.ts":function(e,t,n){n.r(t),n.d(t,{controlActionsMenu:function(){return o}});var r=n("@elementor/editor-ui"),c=n("./packages/packages/libs/menus/src/action.tsx");const o=(0,n("./packages/packages/libs/menus/src/create-menu.ts").createMenu)({components:{Action:c.default,PopoverAction:r.PopoverAction}})},"./packages/packages/libs/menus/src/create-menu.ts":function(e,t,n){n.r(t),n.d(t,{createMenu:function(){return createMenu}});var r=n("@elementor/locations"),c=n("@elementor/utils"),o=n("./packages/packages/libs/menus/src/create-register-item.tsx"),i=n("./packages/packages/libs/menus/src/create-use-menu-items.ts");function createMenu({groups:e=[],components:t}){const n=function createLocations(e){return e.reduce((e,t)=>(e[t]=(0,r.createLocation)(),e),{})}([...e,"default"]),{subscribe:s,notify:u}=function createSubscription(){const e=new Set;return{subscribe:t=>(e.add(t),()=>e.delete(t)),notify:()=>e.forEach(e=>e())}}(),a=function createRegisterFns(e,t,n){return Object.entries(t).reduce((t,[r,i])=>{const s=`register${(0,c.capitalize)(r)}`;return{...t,[s]:(0,o.createRegisterItem)(e,i,n)}},{})}(n,t,u);return{useMenuItems:(0,i.createUseMenuItems)(n,s),...a}}},"./packages/packages/libs/menus/src/create-register-item.tsx":function(e,t,n){n.r(t),n.d(t,{createRegisterItem:function(){return createRegisterItem}});var r=n("react");function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(null,arguments)}function createRegisterItem(e,t,n){return({id:c,group:o="default",priority:i=10,overwrite:s=!1,props:u,useProps:a})=>{if(!(o in e))return;const l=t,p=a||(()=>u);e[o].inject({id:c,component:e=>{const t=p();return r.createElement(l,_extends({},e,t))},options:{priority:i,overwrite:s}}),n()}}},"./packages/packages/libs/menus/src/create-use-menu-items.ts":function(e,t,n){n.r(t),n.d(t,{createUseMenuItems:function(){return createUseMenuItems}});var r=n("react");function createUseMenuItems(e,t){let n=null;t(()=>{n=null});const getMenuItems=()=>n||(n=Object.entries(e).reduce((e,[t,n])=>{const r=n.getInjections().map(e=>({id:e.id,MenuItem:e.component}));return{...e,[t]:r}},{}),n);return()=>(0,r.useSyncExternalStore)(t,getMenuItems)}},"@elementor/editor-ui":function(e){e.exports=window.elementorV2.editorUi},"@elementor/locations":function(e){e.exports=window.elementorV2.locations},"@elementor/ui":function(e){e.exports=window.elementorV2.ui},"@elementor/utils":function(e){e.exports=window.elementorV2.utils},react:function(e){e.exports=window.React}},t={};function __webpack_require__(n){var r=t[n];if(void 0!==r)return r.exports;var c=t[n]={exports:{}};return e[n](c,c.exports,__webpack_require__),c.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){__webpack_require__.r(n),__webpack_require__.d(n,{controlActionsMenu:function(){return t.controlActionsMenu},createMenu:function(){return e.createMenu}});var e=__webpack_require__("./packages/packages/libs/menus/src/create-menu.ts"),t=__webpack_require__("./packages/packages/libs/menus/src/controls-actions.ts")}(),(window.elementorV2=window.elementorV2||{}).menus=n}(),window.elementorV2.menus?.init?.();
//# sourceMappingURL=menus.js.map