import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; import {Session, User} from '../../openaireLibrary/login/utils/helper.class'; import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties'; import {ActivatedRoute} from '@angular/router'; import {CommunitiesService} from '../../openaireLibrary/connect/communities/communities.service'; import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo'; import {UserManagementService} from '../../openaireLibrary/services/user-management.service'; import {Title} from '@angular/platform-browser'; import {properties} from "../../../environments/environment"; import {Subscription} from "rxjs"; import {SearchInputComponent} from '../../openaireLibrary/sharedComponents/search-input/search-input.component'; import {FormBuilder, FormGroup} from '@angular/forms'; import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class'; import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes'; type Tab = 'all' | 'communities' | 'ris'; @Component({ selector: 'manage-communities', template: `