Liferay.Loader.define("@liferay/commerce-term-web@1.0.11/js/DefaultCommerceTermEntries",["module","exports","require","frontend-js-web"],(function(e,t,r){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({baseSelectDefaultCommerceTermEntryURL:e,baseUpdateAccountEntryDefaultCommerceTermEntryURL:t,defaultCommerceTermEntriesContainerId:r}){const a=document.getElementById(r),m=(0,n.delegate)(a,"click",".modify-link",(r=>{r.preventDefault();const n=r.target.closest("a.btn"),{type:a}=n.dataset;((r,n)=>{Liferay.Util.openSelectionModal({buttonAddLabel:Liferay.Language.get("save"),id:"<portlet:namespace />selectDefaultCommerceTermEntry",multiple:!0,onSelect:e=>{if(!e)return;const r=Liferay.Util.PortletURL.createPortletURL(t,{commerceTermEntryId:e.entityid,type:n});submitForm(document.hrefFm,r.toString())},selectEventName:"<portlet:namespace />selectDefaultCommerceTermEntry",title:r,url:Liferay.Util.PortletURL.createPortletURL(e,{type:n})})})((e=>"payment"===e?Liferay.Language.get("set-default-payment-commerce-terms-entry"):"delivery"===e?Liferay.Language.get("set-default-delivery-commerce-terms-entry"):"")(a),a)}));return{dispose(){m.dispose()}}};var n=r("frontend-js-web")}));
//# sourceMappingURL=DefaultCommerceTermEntries.js.map