import { EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef, OnDestroy } from '@angular/core';
import { EntityInfo } from '@memberjunction/core';
import { MJUserViewEntityExtended } from '@memberjunction/core-entities';
import * as i0 from "@angular/core";
/**
 * Represents a view in the dropdown
 */
export interface ViewListItem {
    id: string;
    name: string;
    isOwned: boolean;
    isShared: boolean;
    isDefault: boolean;
    userCanEdit: boolean;
    entity: MJUserViewEntityExtended;
}
/**
 * Event emitted when a view is selected
 */
export interface ViewSelectedEvent {
    viewId: string | null;
    view: MJUserViewEntityExtended | null;
}
/**
 * Event emitted when user requests to save the current view
 */
export interface SaveViewRequestedEvent {
    /** True if user wants to save as a new view */
    saveAsNew: boolean;
}
/**
 * ViewSelectorComponent - Dropdown for selecting saved views
 *
 * Features:
 * - Shows "(Default)" option when no view is selected
 * - Groups views into "My Views" and "Shared Views"
 * - "Save Current View" and "Manage Views" actions
 * - "Open in Tab" button for saved views
 */
export declare class ViewSelectorComponent implements OnChanges, OnDestroy {
    private cdr;
    /**
     * The entity to load views for
     */
    entity: EntityInfo | null;
    /**
     * Currently selected view ID (null = default view)
     */
    selectedViewId: string | null;
    /**
     * Whether the current view has unsaved modifications
     */
    viewModified: boolean;
    /**
     * Emitted when a view is selected
     */
    viewSelected: EventEmitter<ViewSelectedEvent>;
    /**
     * Emitted when user requests to save the current view
     */
    saveViewRequested: EventEmitter<SaveViewRequestedEvent>;
    /**
     * Emitted when user wants to open the view management panel
     */
    manageViewsRequested: EventEmitter<void>;
    /**
     * Emitted when user wants to open the current view in its own tab
     */
    openInTabRequested: EventEmitter<string>;
    /**
     * Emitted when user wants to configure the current view
     */
    configureViewRequested: EventEmitter<void>;
    /**
     * Emitted when user wants to create a new record
     */
    createNewRecordRequested: EventEmitter<void>;
    /**
     * Emitted when user wants to export data to Excel
     */
    exportRequested: EventEmitter<void>;
    /**
     * Emitted when user wants to duplicate a view (F-005)
     */
    duplicateViewRequested: EventEmitter<string>;
    /**
     * Emitted when user wants to use the quick save dialog (F-001)
     * Emits true when user explicitly requested "Save As New", false for general save
     */
    quickSaveRequested: EventEmitter<boolean>;
    /**
     * Emitted when user wants to revert to saved state (F-007)
     */
    revertRequested: EventEmitter<void>;
    isLoading: boolean;
    isDropdownOpen: boolean;
    myViews: ViewListItem[];
    sharedViews: ViewListItem[];
    selectedView: MJUserViewEntityExtended | null;
    searchText: string;
    private destroy$;
    private metadata;
    constructor(cdr: ChangeDetectorRef);
    ngOnChanges(changes: SimpleChanges): void;
    ngOnDestroy(): void;
    /**
     * Load views for the current entity
     */
    loadViews(): Promise<void>;
    /**
     * Map a view entity to a list item
     */
    private mapViewToListItem;
    /**
     * Update the selectedView reference based on selectedViewId
     */
    private updateSelectedViewFromId;
    /**
     * Get the display name for the current selection
     */
    get displayName(): string;
    /**
     * Toggle dropdown open/closed
     */
    toggleDropdown(): void;
    /**
     * Close the dropdown
     */
    closeDropdown(): void;
    /**
     * Select the default view (no saved view)
     */
    selectDefault(): void;
    /**
     * Select a view from the list
     */
    selectView(item: ViewListItem): void;
    /**
     * Request to save the current view
     */
    onSaveView(): void;
    /**
     * Request to save as a new view - opens Quick Save dialog in "Save As New" mode
     */
    onSaveAsNewView(): void;
    /**
     * Request to manage views
     */
    onManageViews(): void;
    /**
     * Request to open the current view in a tab
     */
    onOpenInTab(): void;
    /**
     * Request to configure the current view
     */
    onConfigureView(): void;
    /**
     * Request to create a new record
     */
    onCreateNewRecord(): void;
    /**
     * Request to export data to Excel
     */
    onExport(): void;
    /**
     * Request to duplicate a view (F-005)
     */
    onDuplicateView(viewId: string, event: MouseEvent): void;
    /**
     * Request to open the quick save dialog (F-001)
     */
    onQuickSave(): void;
    /**
     * Request to revert view to saved state (F-007)
     */
    onRevert(): void;
    /**
     * Check if there are any views to show
     */
    get hasViews(): boolean;
    /**
     * Check if the current user can edit the selected view
     */
    get canEditSelectedView(): boolean;
    /**
     * Handle click outside to close dropdown
     */
    onClickOutside(event: Event): void;
    /**
     * My views filtered by search text
     */
    get filteredMyViews(): ViewListItem[];
    /**
     * Shared views filtered by search text
     */
    get filteredSharedViews(): ViewListItem[];
    /**
     * Get the number of filters configured in a view by parsing its FilterState
     */
    getViewFilterCount(view: ViewListItem): number;
    /**
     * Get the number of visible columns in a view by parsing GridState
     */
    getViewColumnCount(view: ViewListItem): number;
    /**
     * Get sort info string from a view's SortState
     */
    getViewSortInfo(view: ViewListItem): string;
    /**
     * Select a specific view and open the config panel for it
     */
    onConfigureViewById(viewId: string, event: MouseEvent): void;
    /**
     * Open a specific view in a new tab
     */
    onOpenViewInTab(viewId: string, event: MouseEvent): void;
    /**
     * Reset to default view (select no view)
     */
    onResetToDefault(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<ViewSelectorComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ViewSelectorComponent, "mj-view-selector", never, { "entity": { "alias": "entity"; "required": false; }; "selectedViewId": { "alias": "selectedViewId"; "required": false; }; "viewModified": { "alias": "viewModified"; "required": false; }; }, { "viewSelected": "viewSelected"; "saveViewRequested": "saveViewRequested"; "manageViewsRequested": "manageViewsRequested"; "openInTabRequested": "openInTabRequested"; "configureViewRequested": "configureViewRequested"; "createNewRecordRequested": "createNewRecordRequested"; "exportRequested": "exportRequested"; "duplicateViewRequested": "duplicateViewRequested"; "quickSaveRequested": "quickSaveRequested"; "revertRequested": "revertRequested"; }, never, never, false, never>;
}
//# sourceMappingURL=view-selector.component.d.ts.map