import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { Observable } from 'rxjs';
import { QdBreakpointService } from '../core/services/breakpoint.service';
import { QdTableEmptyStateService } from './services/empty-state.service';
import { QdTableFillingWidthService } from './services/filling-width.service';
import { QdTableResolverService } from './services/resolver.service';
import { QdTableResponsiveRowService } from './services/responsive-row.service';
import { QdTableRowSelectionService } from './services/row-selection.service';
import { QdTableSecondaryActionsService } from './services/secondary-actions.service';
import { QdTableStoreService } from './store/table-store.service';
import { QdTableDataResolver } from './model/table-data-resolver';
import { QdTableConfig, QdTableFillingColumn } from './model/table-config.interface';
import { QdTableData, QdTableRecentSecondaryAction } from './model/table-data.interface';
import { QdTableSelectedRows } from './model/table-row-selection.interface';
import { QdTableConnectorCriteria } from './model/table-store.interface';
import { QdTablePaginatorComponent } from './paginator/table-paginator.component';
import { QdPushEventsService } from '../core/services/push-events.service';
import * as i0 from "@angular/core";
/**
 * QdTableComponent is a responsive and highly configurable table component designed for effective data display and user interaction.
 * It supports pagination, sorting, actions, selections, and customizable columns.
 *
 * #### **Features**
 * - **RWD Ready**: Automatically adapts to various screen sizes.
 * - **Custom Columns**: Define content types like text, date, chip, or icon.
 * - **Pagination & Sorting**: Supports data pagination and column sorting. Pagination is optional.
 * - **Row Selections**: Single or multiple row selection.
 * - **Actions**: Primary and secondary row actions with refresh support.
 * - **Internationalization (i18ns)**: Localize column headers and specific content types (e.g., text, chip).
 * - **Section Toolbar Communication**: Communicate with the QLS for search and filtering.
 *
 * #### **Basic Usage**
 *
 * ```typescript
 * type ColumnDefinition = 'name' | 'age' | 'active';
 *
 * config: QdTableConfig<ColumnDefinition> = {
 *   columns: [
 *     { column: 'name', type: 'text' },
 *     { column: 'age', type: 'integer' },
 *     { column: 'active', type: 'boolean' }
 *   ]
 * };
 *
 * data: QdTableData<ColumnDefinition> = [
 *   { name: 'Alice', age: 30, active: true },
 *   { name: 'Bob', age: 25, active: false }
 * ];
 * ```
 *
 * ```html
 * <qd-table [config]="config" [data]="data"></qd-table>
 * ```
 *
 * #### **Resolver, Pagination, and Sorting**
 *
 * Load data dynamically, manage pagination, and enable column sorting using Quadrel's interface and injection token.
 *
 * Pagination is optional. If not configured, the full dataset is handled client-side.
 *
 * ```typescript
 * @Injectable()
 * export class MyTableResolver implements QdTableDataResolver<ColumnDefinition> {
 *   resolve(criteria: QdTableDataResolverProps<ColumnDefinition>): Observable<QdTableResolvedData<ColumnDefinition>> {
 *     // custom implementation here
 *   }
 * }
 * ```
 *
 * ```typescript
 * @Component({
 *   selector: 'my-table',
 *   template: '<qd-table [config]="config"></qd-table>',
 *   providers: [
 *     {
 *       provide: QD_TABLE_DATA_RESOLVER_TOKEN,
 *       useClass: MyTableResolver
 *     }
 *   ]
 * })
 * class MyTableComponent {
 *   config: QdTableConfig<ColumnDefinition> = {
 *     columns: [
 *       { column: 'name', type: 'text', sort: { direction: 'asc' } },
 *       { column: 'age', type: 'integer', sort: {} },
 *       { column: 'active', type: 'boolean' }
 *     ],
 *     pagination: {
 *       pageSizes: [10, 20, 50],
 *       pageSizeDefault: 10
 *     } // ← omit this section to disable pagination
 *   };
 * }
 * ```
 *
 * #### **Selections and Actions**
 *
 * Configure row selections and trigger primary or secondary actions.
 *
 * ```typescript
 * config: QdTableConfig<ColumnDefinition> = {
 *   columns: [
 *     { column: 'name', type: 'text' },
 *     { column: 'age', type: 'integer' },
 *     { column: 'active', type: 'boolean' }
 *   ],
 *   selection: {
 *     type: 'multiSelect',
 *     handler: (selectedRows) => select(selectedRows)
 *   },
 *   secondaryActions: [
 *     {
 *       type: 'edit',
 *       handler: ({ rowData }) => edit(rowData)
 *     },
 *     {
 *       type: 'delete',
 *       isDisabled: (row) => !row.active,
 *       handler: ({ rowData }) => delete(rowData)
 *     }
 *   ]
 * };
 * ```
 */
export declare class QdTableComponent<T extends string> implements OnInit, OnChanges, OnDestroy {
    private element;
    private readonly tableDataResolver;
    private readonly pushEventsService;
    private readonly tableStoreService;
    private readonly secondaryActionsService;
    private readonly rowSelectionService;
    private readonly emptyStateService;
    private readonly responsiveRowService;
    private readonly fillingWidthService;
    private readonly breakpointService;
    private readonly resolverService;
    /**
     * Configuration of the table. The generic type specifies the column definition. <br />
     *
     * **Usage:**
     *
     * @example
     * type ColumnDefinition = 'article' | 'mass' | 'documents';
     * const tableConfig: QdTableConfig<ColumnDefinition> = {
     *   columns: [
     *     {
     *       column: 'article',
     *       type: 'text'
     *     },
     *     {
     *       column: 'mass',
     *       type: 'integer'
     *     },
     *     {
     *       column: 'documents',
     *       type: 'boolean'
     *     }
     *   ]
     * }
     */
    config: QdTableConfig<T>;
    /**
     * One way to fill the table with data. Another option is to use a resolver, which is needed for pagination, for instance. <br />
     * The generic type is used for the column definition. <br />
     *
     * **Usage:**
     *
     * @example
     * type ColumnDefinition = 'article' | 'mass' | 'documents';
     * const tableData: QdTableData<ColumnDefinition> = [
     *   {
     *     article: 'article one',
     *     mass: 10,
     *     documents: true
     *   },
     *   {
     *     article: 'article two',
     *     mass: 20,
     *     documents: false
     *   }
     * ]
     */
    set data(data: QdTableData<T>);
    /**
     * A static test ID for integration tests can be set. <br />
     * The value for the HTML attribute [data-test-id].
     */
    testId: string;
    /**
     * Emits an event when an secondary action is triggered. The return value contains the row-specific data. <br />
     * `secondaryActions` must be defined in the table configuration.
     *
     * * @returns EventEmitter with generic type: QdTableRecentSecondaryAction
     */
    secondaryActionOutput: EventEmitter<QdTableRecentSecondaryAction<T>>;
    /**
     * Outputs an event when one or more lines are selected. The return value contains the row-specific data. <br />
     * `multiSelect` or `singleSelect` must be activated in the table configuration.
     *
     * * @returns EventEmitter with generic type: QdTableSelectedRows
     */
    selectedRowsOutput: EventEmitter<QdTableSelectedRows<T>>;
    /**
     * The event is triggered when the no contents are present. <br />
     * The `emptyStateView` must be enabled in the table configuration.
     */
    emptyStateActionOutput: EventEmitter<any>;
    paginator?: QdTablePaginatorComponent<T>;
    get dataTestId(): string;
    data$: Observable<QdTableData<T> | undefined>;
    hasData$: Observable<boolean>;
    hasEmptyStateView$: Observable<boolean>;
    private table$;
    private _data;
    private _recentSecondaryActionsSubscription?;
    private _rowSelectionServiceSubscription?;
    private _emptyStateActionServiceSubscription?;
    private _breakpointSubscription?;
    private _pushEventsSubscription?;
    private _refreshSubscription?;
    private _connectors;
    get whichColumnFillsWidth(): QdTableFillingColumn;
    get hasResolver(): boolean;
    get hasPagination(): boolean;
    constructor(element: ElementRef, tableDataResolver: QdTableDataResolver<T>, pushEventsService: QdPushEventsService, tableStoreService: QdTableStoreService<T>, secondaryActionsService: QdTableSecondaryActionsService<T>, rowSelectionService: QdTableRowSelectionService<T>, emptyStateService: QdTableEmptyStateService, responsiveRowService: QdTableResponsiveRowService<T>, fillingWidthService: QdTableFillingWidthService<T>, breakpointService: QdBreakpointService, resolverService: QdTableResolverService<T>);
    ngOnInit(): void;
    ngOnChanges(changes: SimpleChanges): void;
    ngOnDestroy(): void;
    registerConnector(connectorName: string): void;
    updateFromConnector(connectorName: string, ConnectorCriteria: QdTableConnectorCriteria): Promise<void>;
    private initializeResponsiveRowService;
    private updateResponsiveRowServiceTableConfig;
    private initializeFillingWidthService;
    private updateFillingWidthServiceTableConfig;
    private initializeEmptyStateService;
    private initializeRowSelectionService;
    private initializeSecondaryActionsService;
    private initializePushEventsService;
    private processSecondaryActionRefresh;
    private initRefresh;
    private triggerRefresh;
    private validateConfig;
    /**
     * @description Can be deleted when the property "mainColumnNotFillingWidth" is dropped.
     *
     * * @deprecated
     */
    private mapColumnFillsWidth;
    static ɵfac: i0.ɵɵFactoryDeclaration<QdTableComponent<any>, [null, { optional: true; }, { optional: true; }, null, null, null, null, null, null, null, null]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<QdTableComponent<any>, "qd-table", never, { "config": { "alias": "config"; "required": false; }; "data": { "alias": "data"; "required": false; }; "testId": { "alias": "data-test-id"; "required": false; }; }, { "secondaryActionOutput": "secondaryActionOutput"; "selectedRowsOutput": "selectedRowsOutput"; "emptyStateActionOutput": "emptyStateActionOutput"; }, never, never, false, never>;
}
//# sourceMappingURL=table.component.d.ts.map