Liferay.Loader.define("@liferay/commerce-order-rule-web@1.0.30/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,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function _default({datasetId:e,orderRuleExternalReferenceCode:t,orderRuleId:r,rootPortletId:d}){const a=n.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 selectItem(n){const o={accountExternalReferenceCode:n.externalReferenceCode,accountId:n.id,orderRuleExternalReferenceCode:t,orderRuleId:r};return a.addOrderRuleAccount(r,o).then((()=>{Liferay.fire(i.UPDATE_DATASET_DISPLAY,{id:e})}))},pageSize:10,panelHeaderLabel:Liferay.Language.get("add-accounts"),portletId:d,schema:[{fieldName:"name"}],titleLabel:Liferay.Language.get("add-existing-account")})};var n=_interopRequireDefault(r("commerce-frontend-js/ServiceProvider/index")),o=_interopRequireDefault(r("commerce-frontend-js/components/item_finder/entry")),i=r("commerce-frontend-js/utilities/eventsDefinitions");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=account_entries.js.map