import { DatatableFilterCondition as FilterCondition, DatatableFilterType as FilterType } from './component-filter';
import { IconType } from "../../constants/icons";
export type DatatableSortDir = 'asc' | 'desc';
export type DatatableRowData = {
    [key: string]: any;
};
export type DatatableGroupData = {
    items: DatatableRowData;
    value: any;
    label?: string;
};
type DatatableSortType = {
    field: string;
    dir?: DatatableSortDir;
};
type DatatableResponseMessage = {
    color: 'danger' | 'info' | 'warning';
    icon: IconType;
    content: string;
};
type DatatableResponseData = {
    items: Array<DatatableRowData | DatatableGroupData>;
    pagination?: {
        more: boolean;
        total: number;
        page?: number;
        cursor?: number;
    };
};
export declare class XDatatable {
    /**
     * Datatable ID
     */
    private readonly tableId;
    /**
     * The keyword to search
     */
    private keyword?;
    /**
     * Table is loading state
     */
    loading: boolean;
    /**
     * Datatable active sorting
     */
    sorting?: DatatableSortType;
    /**
     * Datatable active message on response
     */
    message?: DatatableResponseMessage;
    /**
     * Datatable response data
     */
    dataset?: DatatableResponseData;
    /**
     * The active filters data
     */
    activeFilters: Array<{
        type: FilterType;
        field: string;
        condition: FilterCondition;
        value: string;
    }>;
    /**
     * Show the filters dropdown
     */
    showFilters: boolean;
    /**
     * Elements child filters
     */
    filters: Array<HTMLXDatatableFilterElement>;
    /**
     * Element child columns
     */
    columns: Array<HTMLXDatatableColElement>;
    /**
     * Server Side proccesing route
     */
    fetch?: string;
    /**
     * Enable pagination
     */
    pagination: boolean;
    /**
     * Enable search input
     */
    search: boolean;
    /**
     * Element fluid style
     */
    fluid?: boolean;
    /**
     * Element append headers
     */
    appendHeaders: {
        [key: string]: string;
    };
    /**
     * Limit of entries in pagination
     */
    paginationLimit: number;
    /**
     * Group the results by
     */
    groupBy: string;
    /**
     * Group sort direction
     */
    groupSort: DatatableSortDir;
    /**
     * Component element
     */
    el: HTMLElement;
    /**
     * Element event on slot make changes
     */
    handleSlotChange(): void;
    /**
     * Update the child columns and render the result
     */
    private computeChildColumns;
    /**
     * Update the child filters and render the result
     */
    private computeChildFilters;
    /**
     * Move each filter to slot
     */
    private moveChildFilters;
    /**
     * Build the request form data
     */
    private buildRequestBody;
    /**
     * On element will mounted
     */
    componentWillLoad(): void;
    /**
     * On element is mounted
     */
    componentDidLoad(): void;
    /**
     * On finish typing the search input
     */
    onSearchFinishTyping(e: any): void;
    /**
     * Force to rednder the datatable and config
     */
    onLoadMoreElements(): void;
    /**
     * Get the list of active filters
     */
    getActiveFilters(): HTMLXDatatableFilterElement[];
    /**
     * Show the filters dropdown
     */
    showFiltersDrowdown(): void;
    /**
     * Clean all the filters of the datatable
     */
    clearFilters(): void;
    /**
     * Proccess all the filters and mark the active
     */
    applyValidFilters(): void;
    /**
     * Fetch the request data on every change
     */
    fetchData(next?: boolean): void;
    /**
     * Scroll the windown to focus the top table
     */
    scrollToTop(): void;
    /**
     * On click the TH element of header column
     */
    onClickColumn(e: Event, col: HTMLXDatatableColElement): void;
    /**
     * Render Toolbar element
     */
    renderToolbar(): any;
    /**
     * Render the datatable
     */
    renderTable(): any;
    /**
     * Render element
     */
    render(): any;
}
export {};
