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