Liferay.Loader.define("@liferay/frontend-taglib@8.0.2/icon_options/js/PortletOptionsDropdownPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){let{items:r,portletNamespace:o}=t,n=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},c=Object.keys(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(t,["items","portletNamespace"]);const i="".concat(o,"portlet-options portlet-options-dropdown"),l=e=>{const t=e.target.closest(".portlet");t&&t.classList.add("focus");const r=e=>{e.target.closest(".".concat(i))||(t.classList.remove("focus"),document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r))};document.addEventListener("mousedown",r),document.addEventListener("touchstart",r)};return c(c({},n),{},{items:r.map((t=>c(c({},t),{},{onClick(r){var o;const n=null===(o=t.data)||void 0===o?void 0:o.action;if(n){var c;var i,l;if(null===(c=t.data)||void 0===c?void 0:c.globalAction)r.preventDefault(),null===(i=Liferay.__PORTLET_CONFIGURATION_ICON_ACTIONS__)||void 0===i||null===(l=i[n])||void 0===l||l.call(i);else r.preventDefault(),e[n](t.data)}}}))),menuProps:{className:i},onClick:e=>{l(e)},onKeyDown:e=>{"Enter"!==e.key&&"ArrowDown"!==e.key||l(e)}})};var o=r("frontend-js-web");function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const e={openDialog(e){(0,o.openModal)({onClose:()=>{Liferay.Portlet.refresh("#p_p_id_".concat(e.portletId,"_"))},title:e.title,url:e.url})},send(e){submitForm(document.hrefFm,e.url)}}}}));
//# sourceMappingURL=PortletOptionsDropdownPropsTransformer.js.map