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