import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';
import { ResizableColumnComponent } from './resizable-column.component';
import { TableMasterRowComponent } from './table-master-row.component';
import { TableSelectableRowContext } from './table-selectable-row.component';
import * as i0 from "@angular/core";
export type TableSortDirection = 'desc' | 'asc';
export interface TableSort {
    field: string;
    direction: TableSortDirection;
}
export declare class TableComponent implements AfterViewInit, OnDestroy, OnChanges, AfterContentInit {
    private renderer;
    el: ElementRef;
    id: string;
    /**
     * Enables table scrolling with a sticky header and footer. Use
     * <thead> and <tfoot> elements for styles to be applied correctly.
     */
    scrollable: boolean;
    /**
     * Enables resizable table columns. Apply the 'is-resizable' class
     * to the <th> of a table column than can be resized.
     */
    resizable: boolean;
    /**
     * Turns on condensed table styling. By default a condensed table
     * has no row borders. To show borders, apply the 'has-borders' class
     * to the <ec-table> element
     */
    condensed: boolean;
    /**
     * Enables sorting by clicking on table columns. To make a column sortable
     * apply the `data-sortable` attribute to the columns `<th>` element with
     * the value of the field used to sort the column. When a column is clicked
     * the fields and current sort direction is emitted from the `sortChange`
     * output
     *
     * @example
     * ```html
     * <ec-table [sortable]="true" [sort]="currentSort" (sortChange)="onSort($event)">
     *  <thead>
     *    <th data-sortable="name">Name</th>
     *    <th data-sortable="qty">Qty.</th>
     *    <th data-sortable="price">Price</th>
     *  </thead>
     *  ...
     * </ec-table>
     * ```
     */
    sortable: boolean;
    /**
     * Shared context of TableSelectableRowComponents in the table. Will turn on highlighting on row hover.
     * Add the `TableSelectableRowComponent` to the table content to add checkboxes to each row and assign a
     * TemplateRef to the `[selectionToolbarTemplate]` input that includes actions to take on selected items
     * that will appear over the table header when 1 or more rows are selected.
     */
    selectionContext?: TableSelectableRowContext;
    /** Include actions to display in a bar over the table header when 1 or more rows are selected. Requires `[selectionContext]` to be defined */
    selectionToolbarTemplate?: TemplateRef<any>;
    /** Set to true if selectionContext is defined */
    selectable: boolean;
    /** Hides/shows the selection toolbar template when 1 or more rows is selected */
    hasSelection: boolean;
    /**
     * Enables form table styling to allow form controls inside table cells.
     */
    isForm: boolean;
    /**
     * The current sort field and direction ('desc' or 'asc')
     */
    sort?: TableSort | TableSort[];
    /**
     * Emits the new sort value whenever a sortable column is clicked
     */
    sortChange: EventEmitter<TableSort | TableSort[]>;
    /**
     * True if a TableMasterRowComponent exists in the table content
     */
    hasMasterDetailRows: boolean;
    masterRows: QueryList<TableMasterRowComponent>;
    resizableColumns: QueryList<ResizableColumnComponent>;
    _resizableColumns: QueryList<ResizableColumnComponent>;
    searchableTableResizableColumns?: QueryList<ResizableColumnComponent>;
    /**
     * Unlisten function returned by `renderer.listen()` that are called
     * OnDestroy to clean up all listeners
     */
    private unlisteners;
    /** The current sort value */
    private currentSort?;
    /** A map of sortable `<th>` elements */
    private sortableCols;
    private destroyed;
    constructor(renderer: Renderer2, el: ElementRef);
    ngOnChanges(changes: SimpleChanges): void;
    ngAfterContentInit(): void;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    /**
     * Get all elements inside the host element that match a selector
     * @param selector - Any valid selector for [querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll)
     */
    private queryElements;
    /**
     * Store a `<th>` for each sortable column and attach a click
     * event listener.
     */
    private initSortable;
    /**
     * Find the sorted column and apply the desc or asc class in order
     * to show the correct sort icon. If another field was sorted, reset it.
     * Emit the current field and direction of the sorted column
     * @param field
     */
    private onSort;
    private clearSort;
    private applySort;
    private initSelectable;
    static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ec-table", never, { "id": { "alias": "id"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "condensed": { "alias": "condensed"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "selectionContext": { "alias": "selectionContext"; "required": false; }; "selectionToolbarTemplate": { "alias": "selectionToolbarTemplate"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "isForm": { "alias": "isForm"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "searchableTableResizableColumns": { "alias": "resizableColumns"; "required": false; }; }, { "sortChange": "sortChange"; }, ["masterRows", "_resizableColumns"], ["*"], false, never>;
}
