Liferay.Loader.define("@liferay/commerce-order-rule-web@1.0.27/js/account_groups",["module","exports","require","commerce-frontend-js/ServiceProvider/index","commerce-frontend-js/components/item_finder/entry","commerce-frontend-js/utilities/eventsDefinitions"],(function(e,r,t){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.default=function _default({datasetId:e,orderRuleExternalReferenceCode:r,orderRuleId:t,rootPortletId:d}){const a=n.default.AdminOrderAPI("v1");(0,o.default)("itemFinder","item-finder-root",{apiUrl:"/o/headless-commerce-admin-account/v1.0/accountGroups/",getSelectedItems:()=>Promise.resolve([]),inputPlaceholder:Liferay.Language.get("find-an-account-group"),itemCreation:!1,itemSelectedMessage:Liferay.Language.get("account-group-selected"),itemsKey:"id",linkedDatasetsId:[e],onItemSelected:function selectItem(n){const o={accountGroupExternalReferenceCode:n.externalReferenceCode,accountGroupId:n.id,orderRuleExternalReferenceCode:r,orderRuleId:t};return a.addOrderRuleAccountGroup(t,o).then((()=>{Liferay.fire(i.UPDATE_DATASET_DISPLAY,{id:e})}))},pageSize:10,panelHeaderLabel:Liferay.Language.get("add-account-groups"),portletId:d,schema:[{fieldName:"name"}],titleLabel:Liferay.Language.get("add-existing-account-group")})};var n=_interopRequireDefault(t("commerce-frontend-js/ServiceProvider/index")),o=_interopRequireDefault(t("commerce-frontend-js/components/item_finder/entry")),i=t("commerce-frontend-js/utilities/eventsDefinitions");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=account_groups.js.map