Liferay.Loader.define("@liferay/commerce-order-web@5.0.55/js/channels",["module","exports","require","commerce-frontend-js/ServiceProvider/index","commerce-frontend-js/components/item_finder/entry","commerce-frontend-js/utilities/eventsDefinitions","frontend-js-web"],(function(e,n,r){window;{Object.defineProperty(n,"__esModule",{value:!0}),n.default=function({commerceOrderTypeId:e,datasetId:n,orderTypeExternalReferenceCode:r,rootPortletId:o}){const c=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:[n],onItemSelected:function(t){const d={channelExternalReferenceCode:t.externalReferenceCode,channelId:t.id,orderTypeExternalReferenceCode:r,orderTypeId:e};return c.addOrderTypeChannel(e,d).then((()=>{Liferay.fire(a.UPDATE_DATASET_DISPLAY,{id:n})})).catch((e=>{(0,i.openToast)({message:e.title,type:"danger"})}))},pageSize:10,panelHeaderLabel:Liferay.Language.get("add-channels"),portletId:o,schema:[{fieldName:"name"}],titleLabel:Liferay.Language.get("add-existing-channel")})};var t=o(r("commerce-frontend-js/ServiceProvider/index")),d=o(r("commerce-frontend-js/components/item_finder/entry")),a=r("commerce-frontend-js/utilities/eventsDefinitions"),i=r("frontend-js-web");function o(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=channels.js.map