import { EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';
import { MJDashboardEntity, MJDashboardPermissionEntity, MJUserEntity } from '@memberjunction/core-entities';
import * as i0 from "@angular/core";
/**
 * Represents a user share with their permissions
 */
export interface UserSharePermission {
    /** The permission entity (may be new or existing) */
    Permission: MJDashboardPermissionEntity;
    /** The user being shared with */
    User: MJUserEntity;
    /** Whether this is a newly added share */
    IsNew: boolean;
    /** Whether this share has been marked for removal */
    MarkedForRemoval: boolean;
}
/**
 * Result emitted when the dialog is closed
 */
export interface ShareDialogResult {
    /** The action taken: 'save' or 'cancel' */
    Action: 'save' | 'cancel';
    /** The dashboard that was shared (only on save) */
    Dashboard?: MJDashboardEntity;
}
/**
 * Dialog component for sharing dashboards with other users.
 * Allows setting granular permissions (CanRead, CanEdit, CanDelete, CanShare).
 */
export declare class DashboardShareDialogComponent implements OnChanges {
    private cdr;
    Visible: boolean;
    Dashboard: MJDashboardEntity | null;
    Result: EventEmitter<ShareDialogResult>;
    /** Current shares for this dashboard */
    UserShares: UserSharePermission[];
    /** All available users for sharing (excludes owner and already shared) */
    AvailableUsers: MJUserEntity[];
    /** All users in the system */
    private allUsers;
    /** Loading state */
    IsLoading: boolean;
    /** Error message to display */
    Error: string | null;
    /** Search filter for available users */
    UserSearchFilter: string;
    constructor(cdr: ChangeDetectorRef);
    ngOnChanges(changes: SimpleChanges): void;
    /**
     * Reset dialog state
     */
    private resetDialog;
    /**
     * Load existing shares and available users
     */
    private loadData;
    /**
     * Update the list of available users (excludes owner and already shared)
     */
    private updateAvailableUsers;
    /**
     * Get filtered available users based on search
     */
    get FilteredAvailableUsers(): MJUserEntity[];
    /**
     * Check if there are unsaved changes
     */
    get HasChanges(): boolean;
    /**
     * Add a user to the share list
     */
    addUserShare(user: MJUserEntity): Promise<void>;
    /**
     * Mark a share for removal
     */
    removeUserShare(share: UserSharePermission): void;
    /**
     * Undo removal of a share
     */
    undoRemove(share: UserSharePermission): void;
    /**
     * Get shares that are not marked for removal
     */
    get ActiveShares(): UserSharePermission[];
    /**
     * Get shares marked for removal
     */
    get RemovedShares(): UserSharePermission[];
    /**
     * Toggle CanEdit permission (also enables CanRead)
     */
    toggleCanEdit(share: UserSharePermission): void;
    /**
     * Toggle CanDelete permission (also enables CanRead and CanEdit)
     */
    toggleCanDelete(share: UserSharePermission): void;
    /**
     * Toggle CanShare permission (also enables CanRead)
     */
    toggleCanShare(share: UserSharePermission): void;
    /**
     * Save all permission changes
     */
    onSave(): Promise<void>;
    /**
     * Cancel and close the dialog
     */
    onCancel(): void;
    /**
     * Get initials for a user (for avatar display)
     */
    getUserInitials(user: MJUserEntity): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<DashboardShareDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DashboardShareDialogComponent, "mj-dashboard-share-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "Dashboard": { "alias": "Dashboard"; "required": false; }; }, { "Result": "Result"; }, never, never, false, never>;
}
//# sourceMappingURL=dashboard-share-dialog.component.d.ts.map