import { nothing, PropertyValueMap } from 'lit';
import { FileOrderByType, FileOrderType, FileType } from '../types/files.types';
import { WeavyType } from '../contexts/weavy-context';
import { Ref } from 'lit/directives/ref.js';
import { ShadowPartsController } from '../controllers/shadow-parts-controller';
import { WeavySubComponent } from '../classes/weavy-sub-component';
export type FileOrderHeaderType = {
    by: FileOrderByType | undefined;
    title: string;
    col: string;
}[];
declare global {
    interface HTMLElementTagNameMap {
        "wy-file-table": WyFileTable;
    }
}
/**
 * Table view for file lists.
 *
 * **Used sub components:**
 *
 * - [`<wy-file-menu>`](./wy-file-menu.ts)
 * - [`<wy-icon>`](./ui/wy-icon.ts)
 * - [`<wy-button>`](./ui/wy-button.ts)
 *
 * @csspart wy-table - Table root element
 * @csspart wy-table-interactive - Modifier for hoverable rows
 * @csspart wy-tr - Table rows
 * @csspart wy-th - Table header cells
 * @csspart wy-col-icon - Cells that contain icons/actions
 * @csspart wy-col-icon-content - Content in icon/action cells
 * @csspart wy-col-name - Cells that contain name
 * @csspart wy-col-time - Cells that contain time
 * @csspart wy-col-kind - Cells that contain kind
 * @csspart wy-col-size - Cells that contain size
 * @csspart wy-sort-link - Sortable table header cell
 * @csspart wy-input - Input field for file rename.
 * @csspart wy-highlight - Modifier for highlighted row
 * @csspart wy-trashed - Modifier for trashed row.
 * @csspart wy-badge - Badge used for comment counts
 *
 * @fires {FileOpenEventType} file-open - Emitted when a file should be opened in preview.
 * @fires {OrderEventType<FileOrderType>} order - Emitted when the user changes sort order.
 * @fires {FileEditNameEventType} edit-name - Emitted when rename mode is activated.
 * @fires {FileRenameEventType} rename - Emitted when a file is renamed.
 * @fires {FileTrashEventType} trash - Emitted when a file is trashed.
 * @fires {FileRestoreEventType} restore - Emitted when a file is restored.
 * @fires {FileDeleteForeverEventType} delete-forever - Emitted when a file is permanently deleted.
 * @fires {FileSubscribeEventType} subscribe - Emitted when subscribe state is toggled.
 */
export declare class WyFileTable extends WeavySubComponent {
    static styles: import('lit').CSSResult[];
    /** @internal */
    protected exportParts: ShadowPartsController;
    /**
     * Files rendered in the table view.
     */
    files?: FileType[];
    /**
     * Active sort order for the table.
     */
    order: FileOrderType;
    /**
     * Current file id in rename mode.
     *
     * @internal
     */
    isRenamingId?: number;
    /**
     * File id that should be highlighted and scrolled into view.
     *
     * @internal
     */
    highlightId?: number;
    /**
     * Scroll target used for highlighted rows.
     *
     * @internal
     */
    private highlightRef;
    constructor();
    /**
     * Emit a `file-open` event requesting preview for the supplied file.
     *
     * @param fileId - Identifier of the file to open.
     * @param tab - Optional preview tab to activate.
     * @returns Whether the event was not canceled.
     */
    dispatchFileOpen(fileId: number, tab?: "comments" | "versions"): boolean;
    /**
     * Emit an `order` event with the provided sort order.
     *
     * @param order - Order to apply.
     * @returns Whether the event was not canceled.
     */
    dispatchOrder(order: FileOrderType): boolean;
    /**
     * Emit an `edit-name` event to enter rename mode for the specified file.
     *
     * @param file - File that should be renamed.
     * @returns Whether the event was not canceled.
     */
    dispatchEditName(file: FileType): boolean;
    /**
     * Emit a `rename` event carrying the updated filename.
     *
     * @param file - File being renamed.
     * @param name - New filename value.
     * @returns Whether the event was not canceled.
     */
    dispatchRename(file: FileType, name: string): boolean;
    /**
     * Emit a `trash` event to move the file to the recycle bin.
     *
     * @param file - File to trash.
     * @returns Whether the event was not canceled.
     */
    dispatchTrash(file: FileType): boolean;
    /**
     * Emit a `restore` event to recover a trashed file.
     *
     * @param file - File to restore.
     * @returns Whether the event was not canceled.
     */
    dispatchRestore(file: FileType): boolean;
    /**
     * Emit a `delete-forever` event to permanently remove the file.
     *
     * @param file - File targeted for permanent deletion.
     * @returns Whether the event was not canceled.
     */
    dispatchDeleteForever(file: FileType): boolean;
    /**
     * Emit a `subscribe` event toggling subscription state for the file.
     *
     * @param file - File whose subscription changes.
     * @param subscribe - Desired subscription state.
     * @returns Whether the event was not canceled.
     */
    dispatchSubscribe(file: FileType, subscribe: boolean): boolean;
    /**
     * Render the complete file table layout.
     *
     * @param files - Files to render.
     * @param order - Current table order.
     * @param isRenamingId - File id in rename mode.
     * @param highlightId - File id to highlight.
     * @param highlightRef - Reference for scrolling highlighted rows.
     */
    renderFileTable(files: FileType[], order?: FileOrderType, isRenamingId?: number, highlightId?: number, highlightRef?: Ref): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1> | typeof nothing;
    /**
     * Render table header cells with sorting affordances.
     *
     * @param order - Current sort order.
     */
    renderFileTableHeaders(order?: FileOrderType): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>;
    /**
     * Render a single file table row.
     *
     * @param weavy - Current Weavy context.
     * @param row - Row data containing the file.
     * @param isRenamingId - File id in rename mode.
     * @param highlightId - File id to highlight.
     * @param highlightRef - Reference for scrolling highlighted rows.
     */
    renderFileTableRow(weavy: WeavyType | undefined, { file }: {
        file: FileType;
    }, isRenamingId?: number, highlightId?: number, highlightRef?: Ref): 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;
    protected updated(changedProperties: PropertyValueMap<this>): void;
}
//# sourceMappingURL=wy-file-table.d.ts.map