import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; import { BaseAngularComponent } from '@memberjunction/ng-base-types'; import { ListSharingService } from '../../services/list-sharing.service'; import { ListShareDialogConfig, ListShareDialogResult, ListShareInfo, ListPermissionLevel, ShareRecipient } from '../../models/list-sharing.models'; import * as i0 from "@angular/core"; /** * Dialog component for managing list sharing. * Allows users to share lists with other users or roles with different permission levels. * * Features: * - User/role search with autocomplete * - Permission level selection (View, Edit, Owner) * - Current shares management * - Remove access functionality */ export declare class ListShareDialogComponent extends BaseAngularComponent implements OnInit, OnDestroy { private sharingService; private cdr; /** * Configuration for the dialog */ config: ListShareDialogConfig; /** * Supporting message for the empty-state shown when a list has no shares. * Appends a usage hint when the current user can manage shares. */ get EmptyShareMessage(): string; /** * Controls dialog visibility */ get visible(): boolean; set visible(value: boolean); private _visible; /** * Emitted when dialog is closed with results */ complete: EventEmitter; /** * Emitted when dialog is cancelled */ cancel: EventEmitter; /** * Emitted when the user clicks "Manage Invitations" in the footer. * Phase 2: opens the invitations management UI for this list. */ manageInvitations: EventEmitter; /** * Emitted when the user clicks "View audit log" in the footer. * Phase 2: opens the per-list audit log view. */ viewAuditLog: EventEmitter; /** * When true (the default), newly-added shares fan out as notifications * to the recipient (email + in-app, depending on user preferences). * The state is captured on the dialog so consumers can read it back * via `ListShareDialogResult.notifyByEmail`. */ notifyByEmail: boolean; loading: boolean; saving: boolean; searchText: string; searchType: 'User' | 'Role'; showSearchResults: boolean; currentShares: ListShareInfo[]; searchResults: ShareRecipient[]; selectedRecipient: ShareRecipient | null; selectedPermission: ListPermissionLevel; sharesAdded: ListShareInfo[]; sharesUpdated: ListShareInfo[]; sharesRemoved: string[]; permissionOptions: { value: ListPermissionLevel; label: string; description: string; }[]; private destroy$; private searchSubject; constructor(sharingService: ListSharingService, cdr: ChangeDetectorRef); ngOnInit(): void; ngOnDestroy(): void; /** * Get dialog title */ get dialogTitle(): string; /** * Check if there are pending changes */ get hasChanges(): boolean; /** * Setup search with debounce */ private setupSearchDebounce; /** * Initialize dialog when opened */ private initializeDialog; /** * Reset all state */ private resetState; /** * Load current shares for the list */ private loadCurrentShares; /** * Handle search input */ onSearchInput(event: Event): void; /** * Clear search */ clearSearch(): void; /** * Switch search type */ setSearchType(type: 'User' | 'Role'): void; /** * Perform search */ private performSearch; /** * Select a recipient from search results */ selectRecipient(recipient: ShareRecipient): void; /** * Add the selected recipient as a share */ addShare(): Promise; /** * Update permission level for an existing share */ updateSharePermission(share: ListShareInfo, newLevel: ListPermissionLevel): Promise; /** * Remove a share */ removeShare(share: ListShareInfo): Promise; /** * Get icon for share type */ getShareTypeIcon(type: 'User' | 'Role'): string; /** * Get permission label */ getPermissionLabel(level: ListPermissionLevel): string; /** * Close dialog with results */ onDone(): void; /** * Cancel and close dialog */ onCancel(): void; /** * Check if current user can modify shares */ get canModifyShares(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=list-share-dialog.component.d.ts.map