import { BooleanInput } from '@angular/cdk/coercion';
import { EventEmitter, InjectionToken, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { Subject } from 'rxjs';
import { SortDirection } from './sort-direction';
import { CanDisable } from './sort-header';
/** Interface for a directive that holds sorting state consumed by `RSortHeader`. */
export interface RSortable {
    /** The id of the column being sorted. */
    id: string;
    /** Starting sort direction. */
    start: 'asc' | 'desc';
    /** Whether to disable clearing the sorting state. */
    disableClear: boolean;
}
/** The current sort state. */
export interface Sort {
    /** The id of the column being sorted. */
    active: string;
    /** The sort direction. */
    direction: SortDirection;
}
/** Default options for `r-sort`.  */
export interface RSortDefaultOptions {
    /** Whether to disable clearing the sorting state. */
    disableClear?: boolean;
}
/** Injection token to be used to override the default options for `r-sort`. */
export declare const R_SORT_DEFAULT_OPTIONS: InjectionToken<RSortDefaultOptions>;
/** Container for RSortables to manage the sort state and provide default sort parameters. */
export declare class RSort implements CanDisable, OnChanges, OnDestroy, OnInit {
    private _defaultOptions?;
    /** Collection of all registered sortables that this directive manages. */
    sortables: Map<string, RSortable>;
    disabled: any;
    initialized: any;
    _markInitialized: () => void;
    /** Used to notify any child components listening to state changes. */
    readonly _stateChanges: Subject<void>;
    /** The id of the most recently sorted RSortable. */
    active: string;
    /**
     * The direction to set when an RSortable is initially sorted.
     * May be overriden by the RSortable's sort start.
     */
    start: 'asc' | 'desc';
    /** The sort direction of the currently active RSortable. */
    get direction(): SortDirection;
    set direction(direction: SortDirection);
    private _direction;
    /**
     * Whether to disable the user from clearing the sort by finishing the sort direction cycle.
     * May be overriden by the RSortable's disable clear input.
     */
    get disableClear(): boolean;
    set disableClear(v: boolean);
    private _disableClear;
    /** Event emitted when the user changes either the active sort or sort direction. */
    readonly sortChange: EventEmitter<Sort>;
    constructor(_defaultOptions?: RSortDefaultOptions);
    /**
     * Register function to be used by the contained RSortables. Adds the RSortable to the
     * collection of RSortables.
     */
    register(sortable: RSortable): void;
    /**
     * Unregister function to be used by the contained RSortables. Removes the RSortable from the
     * collection of contained RSortables.
     */
    deregister(sortable: RSortable): void;
    /** Sets the active sort id and determines the new sort direction. */
    sort(sortable: RSortable): void;
    /** Returns the next sort direction of the active sortable, checking for potential overrides. */
    getNextSortDirection(sortable: RSortable): SortDirection;
    ngOnInit(): void;
    ngOnChanges(): void;
    ngOnDestroy(): void;
    static ngAcceptInputType_disableClear: BooleanInput;
    static ngAcceptInputType_disabled: BooleanInput;
}
