Liferay.Loader.define("@liferay/commerce-order-rule-web@1.0.33/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 _default({dataSetId:e,orderRuleExternalReferenceCode:n,orderRuleId:r,rootPortletId:a}){const o=t.default.AdminOrderAPI("v1");(0,i.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 selectItem(t){const i={channelExternalReferenceCode:t.externalReferenceCode,channelId:t.id,orderRuleExternalReferenceCode:n,orderRuleId:r};return o.addOrderRuleChannel(r,i).then((()=>{Liferay.fire(d.FDS_UPDATE_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=_interopRequireDefault(r("commerce-frontend-js/ServiceProvider/index")),i=_interopRequireDefault(r("commerce-frontend-js/components/item_finder/entry")),d=r("commerce-frontend-js/utilities/eventsDefinitions");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=commerce_channels.js.map