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