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