Liferay.Loader.define("users-admin-web@6.0.71/js/actions.es",["module","exports","require","frontend-js-web"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.ACTIONS=void 0;var n=o("frontend-js-web");const e={activateUser(e){submitForm(document.hrefFm,e.activateUserURL)},assignOrganizationRoles(e){(0,n.openModal)({title:e.label,url:e.assignOrganizationRolesURL})},assignUsers(e,t){this.selectUsers({basePortletURL:e.basePortletURL,organizationId:e.organizationId,portletNamespace:t})},deactivateUser(e){(0,n.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-deactivate-this"),onConfirm:t=>{t&&submitForm(document.hrefFm,e.deactivateUserURL)}})},deleteUser(e){(0,n.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-delete-this"),onConfirm:t=>{t&&submitForm(document.hrefFm,e.deleteUserURL)}})},deleteUserActionContributor(e){(0,n.openConfirmModal)({message:e.confirmation,onConfirm:t=>{t&&submitForm(document.hrefFm,e.deleteUserActionContributorURL)}})},permissions(e){(0,n.openModal)({title:Liferay.Language.get("permissions"),url:e.permissionsURL})},removeOrganization(e){submitForm(document.hrefFm,e.removeOrganizationURL)},removeUser(e){submitForm(document.hrefFm,e.removeUserURL)},selectUsers({basePortletURL:e,organizationId:t,portletNamespace:o}){if(!t)return;const r=(0,n.createRenderURL)(e,{mvcPath:"/select_organization_users.jsp",organizationId:t,p_p_state:"pop_up"});(0,n.openSelectionModal)({buttonAddLabel:Liferay.Language.get("done"),multiple:!0,onSelect:r=>{if(null==r?void 0:r.length){const a=(0,n.createRenderURL)(e,{mvcRenderCommandName:"/users_admin/view",organizationId:t,toolbarItem:"view-all-organizations",usersListView:"tree"}),i=r.map((e=>e.value)),s=(0,n.createActionURL)(e,{addUserIds:i.join(","),assignmentsRedirect:a.toString(),"javax.portlet.action":"/users_admin/edit_organization_assignments",organizationId:t}),m=document.getElementById("".concat(o,"fm"));if(!m)return;submitForm(m,s.toString())}},title:Liferay.Language.get("assign-users"),url:r.toString()})}};t.ACTIONS=e}}));
//# sourceMappingURL=actions.es.js.map