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