import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { ErrorService } from '../../core/error.service';
import { Overlay } from '../view-overlay/view-overlay.component';
import { TableSort } from './table.component';
export declare type TableSearchResults = {
    items: unknown[];
    totalItems: number;
};
export declare type SearchableTableRefreshOptions = {
    clearSearch?: boolean;
};
export declare class SearchableTableComponent implements OnInit, OnDestroy {
    private errorService;
    private translateService;
    id: string;
    resizable: boolean;
    sortable: boolean;
    sort?: TableSort;
    autofocus: boolean;
    /** Emits when table sort has changed */
    sortChange: EventEmitter<TableSort>;
    /** Placeholder text for the searchbox */
    searchboxPlaceholder: string;
    /**
     * FormGroup for the searchbox
     *
     * The referenced FormGroup **must** contain a FormControl called 'searchModel'.
     */
    formModel: FormGroup;
    /**
     * Displayed in overlay when no data is returned (without searching).
     *
     * Defaults to "SearchableTable_Default_NoData_SC"
     */
    noDataMessage: string;
    /**
     * Displayed in overlay when no data is returned (after searching).
     * Ensure translation has an interpolation placeholder for "searchText".
     *
     * Defaults to "SearchableTable_Default_NoMatches_SC"
     *
     * @example
     * // 7 requires single curly braces
     * No items found matching <strong>{{searchText}}</strong>
     */
    noSearchResultsMessage: string;
    /**
     * Indicates hosting page is ready for the table to load data.
     *
     * Next and Complete this observable after hosting page has made any preliminary
     * API (or other asynchronous) calls to load prerequisite data upon which the code
     * in the `getItems` function depends.  Use a `ReplaySubject` to ensure every component
     * that uses this observable gets the Next and Complete notifications.
     */
    ready: Observable<void>;
    /**
     * Function called to get items to display in the table.
     *
     * Make sure to bind the scope in the template
     * @example
     * [getItems]="yourFunction.bind(this)"
     */
    getItems: (search?: string) => Observable<TableSearchResults>;
    /** Observable that will force the getItems function to get called again */
    refresh?: Observable<SearchableTableRefreshOptions | undefined>;
    /** Allow the host component to supply an overlay to control the pending state of the table */
    status: Overlay;
    /**
     * Sets the underlying table's layout to fixed.
     */
    tableLayoutFixed: boolean;
    /** Emits items returned by the getItems function, along with total count */
    itemsChange: EventEmitter<TableSearchResults>;
    /** Optional tab index for the searchbox */
    searchboxTabIndex?: number;
    /** Maximum number of items to show in the table (default: 100) */
    maxItemCount: number;
    /** Set to true to hide search box (does not hide the other searchable table controls */
    hideSearchControl: boolean;
    /** Set to true to hide the entire header */
    hideHeader: boolean;
    /** Type of object in the table. Displayed in footer (default: 'results')*/
    objectType: string;
    /** Reference to the searchModel */
    get searchModel(): FormControl;
    /**
     * Text displayed in the footer.
     * Sometimes `noDataMessage`, sometimes `noSearchResultsMessage`
     */
    tableCaption: string;
    /** count of results displayed in the table */
    resultsCount: string;
    /** Items returned by the getItems function, along with total count */
    searchResults: TableSearchResults;
    /**
     * If passed an input for refresh, triggers reloading items.
     * Otherwise, completes immediately (will never trigger reload).
     */
    private refreshTrigger;
    private destroyed;
    constructor(errorService: ErrorService, translateService: TranslateService);
    ngOnInit(): void;
    ngOnDestroy(): void;
    /** Pass along sort to parent component */
    onSortChange(sort: TableSort): void;
    /**
     * Wire up a handler to the `refresh` observable so that when
     * the host page context changes it can force the table to update as well.
     *
     * If the `refresh` observable passes options and the `clearSearch` property
     * is set to true, reset the searchModel and pass an empty string.
     *
     * If `refresh` observable does not pass options or the `clearSearch` property
     * is set to false, pass along the current searchModel Value.
     */
    private setUpRefreshTrigger;
    /** Get text to display in the footer. */
    private getCaption;
    private getResultsCount;
}
