import { PropertyValueMap, nothing } from 'lit';
import { FileLoadingState, FilesResultType, FileType } from '../types/files.types';
import { FileVersionSelectEventType } from '../types/files.events';
import { InfiniteData, InfiniteQueryObserverResult, QueryObserverResult } from '@tanstack/query-core';
import { UserType } from '../types/users.types';
import { Ref } from 'lit/directives/ref.js';
import { WeavySubAppComponent } from '../classes/weavy-sub-app-component';
import { ShadowPartsController } from '../controllers/shadow-parts-controller';
declare global {
    interface HTMLElementTagNameMap {
        "wy-preview": WyPreview;
    }
}
/**
 * Preview component.
 * Consumes WeavyComponent contexts.
 *
 * **Used sub components:**
 *
 * - [`<wy-button>`](./ui/wy-button.ts)
 * - [`<wy-dropdown>`](./ui/wy-dropdown.ts)
 * - [`<wy-icon>`](./ui/wy-icon.ts)
 * - [`<wy-item>`](./ui/wy-item.ts)
 * - [`<wy-overlay>`](./ui/wy-overlay.ts)
 * - [`<wy-progress-circular>`](./ui/wy-progress-circular.ts)
 * - [`<wy-titlebar>`](./ui/wy-titlebar.ts)
 * - [`<wy-preview-item>`](./wy-preview-item.ts)
 * - [`<wy-file-menu>`](./wy-file-menu.ts)
 * - [`<wy-comment-list>`](./wy-comment-list.ts)
 * - [`<wy-file-versions>`](./wy-file-versions.ts)
 *
 * @csspart wy-dark - Overlay dark/root modifier.
 * @csspart wy-preview-layout - Layout wrapper for the preview.
 * @csspart wy-preview-main - Main preview content area.
 * @csspart wy-sidebar - Sidebar container for comments/versions.
 * @csspart wy-pane - Pane wrapper inside sidebars.
 * @csspart wy-preview - Preview container for content.
 * @csspart wy-preview-swiper - Swiper container for multiple preview panes.
 * @csspart wy-preview-area - Individual preview area for a single file.
 * @csspart wy-nav-prev - Previous navigation control.
 * @csspart wy-nav-next - Next navigation control.
 *
 * @fires {WyPreviewOpenEventType} wy-preview-open - Fired when a preview overlay is about to open.
 * @fires {WyPreviewCloseEventType} wy-preview-close - Fired when a preview overlay is closed.
 * @fires {WyActionEventType} wy-action - Emitted when an embed action button is triggered.
 */
export declare class WyPreview extends WeavySubAppComponent {
    static styles: import('lit').CSSResult[];
    /**
     * Controller for exporting named shadow parts.
     *
     * @internal
     */
    protected exportParts: ShadowPartsController;
    /**
     * Files available to render inside the preview carousel.
     */
    files?: FileType[];
    /**
     * Query result used to hydrate {@link files}.
     *
     * @internal
     */
    queryResult?: QueryObserverResult<FileType[]>;
    /**
     * Infinite query result backing the preview list.
     *
     * @internal
     */
    infiniteQueryResult?: InfiniteQueryObserverResult<InfiniteData<FilesResultType, unknown>>;
    /**
     * Authenticated user context used for sidebar content.
     *
     * @internal
     */
    user: UserType | undefined;
    /**
     * Identifier of the file currently displayed in the overlay.
     *
     * @attr
     */
    currentId: number;
    /**
     * Treat provided files as attachments, disabling contextual sidebars.
     *
     * @attr
     */
    isAttachment: boolean;
    /**
     * Forces the overlay to use the full-screen layout.
     *
     * @attr
     */
    filled: boolean;
    /**
     * File currently selected in the carousel.
     *
     * @internal
     */
    currentFile?: FileType;
    /**
     * Selected file version rendered in the main area.
     *
     * @internal
     */
    currentVersionFile?: FileType;
    /**
     * Previous file candidate for navigation.
     *
     * @internal
     */
    previousFile?: FileType;
    /**
     * Next file candidate for navigation.
     *
     * @internal
     */
    nextFile?: FileType;
    /**
     * Overlay visibility flag.
     *
     * @internal
     */
    showOverlay: boolean;
    /**
     * Comments sidebar visibility flag.
     *
     * @internal
     */
    commentsOpen: boolean;
    /**
     * Versions sidebar visibility flag.
     *
     * @internal
     */
    versionsOpen: boolean;
    /**
     * Whether the active sidebar occupies extra width.
     *
     * @internal
     */
    protected sidePanelMaximized: boolean;
    /**
     * Persists sidebar state per app/user combination.
     *
     * @internal
     */
    private persistState;
    /**
     * Handles swipe navigation between preview panes.
     *
     * @internal
     */
    private swipeScroller;
    /**
     * Reference to the current preview element.
     *
     * @internal
     */
    protected previewFileRef: Ref<Element>;
    /**
     * Reference to the next preview element.
     *
     * @internal
     */
    protected nextRef: Ref<Element>;
    /**
     * Reference to the previous preview element.
     *
     * @internal
     */
    protected prevRef: Ref<Element>;
    /**
     * Element monitored for swipe intersection changes.
     *
     * @internal
     */
    swipeScrollElement?: Element;
    /**
     * Loading states and queue order for preview items. Make sure to update it with immutable states.
     * @internal
     */
    loadingQueue: FileLoadingState[];
    /**
     * Prevents swipe navigation while programmatic scrolling is in progress.
     *
     * @internal
     */
    protected disableSwipeScroll: boolean;
    /**
     * Timeout id used to re-enable swipe scrolling.
     *
     * @internal
     */
    private disableSwipeScrollTimeout?;
    /**
     * Disable swipe scroll while resizing.
     * Needed by Safari.
     * @internal
     */
    resizeObserver: ResizeObserver;
    /**
     * Moves a file to the front of the loading queue.
     *
     * @internal
     * @param file - File to prioritize.
     * @param state - Optional state override.
     */
    moveFirstInQueue(file: FileType, state?: Omit<FileLoadingState, "file">): void;
    /**
     * Updates loading metadata for the supplied file.
     *
     * @internal
     * @param file - File whose state should change.
     * @param state - State patch to merge.
     */
    updateLoadingState(file?: FileType, state?: Omit<FileLoadingState, "file">): void;
    /**
     * Marks the next unloaded item as loading.
     *
     * @internal
     */
    loadNextInQueue(): void;
    /**
     * Emits `wy-preview-open` with the current preview context.
     *
     * @internal
     */
    dispatchOpen(): Promise<void>;
    /**
     * Emits the `wy-preview-close` event.
     *
     * @internal
     */
    dispatchClose(): void;
    /**
     * Opens the overlay for the provided file identifier.
     *
     * @param fileId - File to display.
     * @param showTab - Optional sidebar tab to activate.
     */
    open(fileId: number, showTab?: "comments" | "versions"): Promise<void>;
    /**
     * Closes the preview overlay.
     */
    close(): void;
    /**
     * Toggles sidebar visibility for comments or versions.
     *
     * @internal
     * @param tab - Sidebar to affect.
     * @param state - Forced open state; toggles when omitted.
     */
    toggleSidebarTab(tab?: "comments" | "versions", state?: boolean): void;
    /**
     * Handles file version selection events.
     *
     * @internal
     * @param e - Version selection event.
     */
    handleVersionFile(e: FileVersionSelectEventType): void;
    /**
     * Keyboard navigation handler for the overlay.
     *
     * @internal
     */
    handleKeys: (e: KeyboardEvent) => void;
    /**
     * Scrolls to the previous preview area.
     *
     * @internal
     */
    scrollToPrev(): void;
    /**
     * Scrolls to the next preview area.
     *
     * @internal
     */
    scrollToNext(): void;
    /**
     * Disables swipe scrolling for a short duration.
     *
     * @internal
     * @param duration - Milliseconds before re-enabling.
     */
    blockSwipeScroll(duration?: number): void;
    /**
     * Re-enables swipe scrolling immediately.
     *
     * @internal
     */
    unblockSwipeScroll(): void;
    /**
     * Selects the previous file when available.
     *
     * @internal
     */
    setPrev(): void;
    /**
     * Selects the next file when available.
     *
     * @internal
     */
    setNext(): void;
    /**
     * Registers swipe observers on the active scroll element.
     *
     * @internal
     */
    registerSwipeScroller(): void;
    willUpdate(changedProperties: PropertyValueMap<this>): Promise<void>;
    /**
     * Renders the preview header for the active file.
     *
     * @internal
     * @param activeFile - File displayed in the main pane.
     */
    renderHeader(activeFile?: FileType): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>;
    render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1> | typeof nothing;
    updated(changedProperties: PropertyValueMap<this>): void;
}
//# sourceMappingURL=wy-preview.d.ts.map