Liferay.Loader.define("@liferay/commerce-order-rule-web@1.0.23/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({datasetId:e,orderRuleExternalReferenceCode:r,orderRuleId:t,rootPortletId:i}){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(n){const o={accountGroupExternalReferenceCode:n.externalReferenceCode,accountGroupId:n.id,orderRuleExternalReferenceCode:r,orderRuleId:t};return a.addOrderRuleAccountGroup(t,o).then((()=>{Liferay.fire(d.UPDATE_DATASET_DISPLAY,{id:e})}))},pageSize:10,panelHeaderLabel:Liferay.Language.get("add-account-groups"),portletId:i,schema:[{fieldName:"name"}],titleLabel:Liferay.Language.get("add-existing-account-group")})};var n=i(t("commerce-frontend-js/ServiceProvider/index")),o=i(t("commerce-frontend-js/components/item_finder/entry")),d=t("commerce-frontend-js/utilities/eventsDefinitions");function i(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=account_groups.js.map