Liferay.Loader.define("account-admin-web@2.0.39/account_entries_admin/js/DefaultAddresses",["module","exports","require","frontend-js-web"],(function(e,t,a){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({baseSelectDefaultAddressURL:e,baseUpdateAccountEntryDefaultAddressesURL:t,defaultAddressesContainerId:a}){const d=document.getElementById(a),n=(0,s.delegate)(d,"click",".modify-link",(a=>{a.preventDefault();const s=a.target.closest("a.btn"),{type:d}=s.dataset;((a,s)=>{Liferay.Util.openSelectionModal({buttonAddLabel:Liferay.Language.get("save"),id:"<portlet:namespace />selectDefaultAddress",multiple:!0,onSelect:e=>{if(!e)return;const a=Liferay.Util.PortletURL.createPortletURL(t,{addressId:e.entityid,type:s});submitForm(document.hrefFm,a.toString())},selectEventName:"<portlet:namespace />selectDefaultAddress",title:a,url:Liferay.Util.PortletURL.createPortletURL(e,{type:s})})})((e=>"billing"===e?Liferay.Language.get("set-default-billing-address"):"shipping"===e?Liferay.Language.get("set-default-shipping-address"):"")(d),d)}));return{dispose(){n.dispose()}}};var s=a("frontend-js-web")}));
//# sourceMappingURL=DefaultAddresses.js.map