import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; import { BaseAngularComponent } from '@memberjunction/ng-base-types'; import { MJListEntity, MJListCategoryEntity } from '@memberjunction/core-entities'; import { ListManagementService } from '../../services/list-management.service'; import { ListManagementDialogConfig, ListManagementResult, ListItemViewModel, ListFilterTab, ListSortOption } from '../../models/list-management.models'; import * as i0 from "@angular/core"; /** * A gorgeous, responsive dialog for managing list membership. * Supports adding/removing records from multiple lists with membership indicators. * * Features: * - Search and filter lists * - Visual membership indicators (full/partial/none) * - Inline list creation * - Mobile-responsive bottom sheet on small screens * - Batch operations with progress feedback */ export declare class ListManagementDialogComponent extends BaseAngularComponent implements OnInit, OnDestroy { private listService; private cdr; /** * Configuration for the dialog. * * Initialization is deliberately order-independent with {@link visible}: * Angular assigns inputs in template attribute order, so a host binding * `[visible]` before `[config]` would otherwise open the dialog while * `config` is still undefined — `loadData()` would bail silently and the * dialog would render permanently empty. */ get config(): ListManagementDialogConfig; set config(value: ListManagementDialogConfig); private _config; /** * Controls dialog visibility */ get visible(): boolean; set visible(value: boolean); private _visible; /** Set on each closed→open transition; cleared once init actually runs (requires config). */ private _pendingInit; /** Runs initialization once per open, as soon as BOTH visible and config are available. */ private tryInitialize; /** * Emitted when dialog is closed with results */ complete: EventEmitter; /** * Emitted when dialog is cancelled */ cancel: EventEmitter; loading: boolean; saving: boolean; searchText: string; activeTab: ListFilterTab; sortOption: ListSortOption; showCreateForm: boolean; allLists: ListItemViewModel[]; filteredLists: ListItemViewModel[]; categories: MJListCategoryEntity[]; newListName: string; newListDescription: string; newListCategoryId: string | null; private originalMembership; addedToLists: Set; removedFromLists: Set; newlyCreatedLists: MJListEntity[]; private destroy$; private searchSubject; constructor(listService: ListManagementService, cdr: ChangeDetectorRef); ngOnInit(): void; ngOnDestroy(): void; /** * Get dialog title based on config */ get dialogTitle(): string; /** * Get subtitle showing context */ get dialogSubtitle(): string; /** * Check if there are pending changes */ get hasChanges(): boolean; /** * Get count of lists to add to */ get addCount(): number; /** * Get count of lists to remove from */ get removeCount(): number; /** * Setup search with debounce */ private setupSearchDebounce; /** * Initialize dialog when opened */ private initializeDialog; /** * Reset all state */ private resetState; /** * Load lists and membership data */ private loadData; /** * Handle search input */ onSearchInput(event: Event): void; /** * Clear search */ clearSearch(): void; /** * Change active tab */ setActiveTab(tab: ListFilterTab): void; /** * Change sort option */ setSortOption(option: ListSortOption): void; /** * Apply all filters and sorting */ private applyFilters; /** * Toggle list selection for adding */ toggleListForAdd(vm: ListItemViewModel): void; /** * Toggle list selection for removal */ toggleListForRemove(vm: ListItemViewModel): void; /** * Get membership indicator class */ getMembershipClass(vm: ListItemViewModel): string; /** * Get membership indicator text */ getMembershipText(vm: ListItemViewModel): string; /** * Get membership icon */ getMembershipIcon(vm: ListItemViewModel): string; /** * Show create list form */ showCreateListForm(): void; /** * Cancel create list form */ cancelCreateList(): void; /** * Create a new list */ createList(): Promise; /** * Apply changes and close dialog */ applyChanges(): Promise; /** * Cancel and close dialog */ onCancel(): void; /** * Format date for display */ formatDate(date: Date): string; /** * Check if we should show the add button for a list */ showAddButton(vm: ListItemViewModel): boolean; /** * Check if we should show the remove button for a list */ showRemoveButton(vm: ListItemViewModel): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=list-management-dialog.component.d.ts.map