import * as i0 from '@angular/core';
import { ElementRef, OnInit, OnDestroy, OnChanges, AfterViewInit, TrackByFunction, TemplateRef, IterableDiffers, ChangeDetectorRef, SimpleChanges, ViewContainerRef } from '@angular/core';
import { IconFont } from '@fundamental-ngx/core/icon';

interface TimelineNodeComponentInterface {
    glyph: string;
    el: ElementRef;
    lineEl: ElementRef;
}

type TimelineAxis = 'vertical' | 'horizontal';
type TimelineSidePosition = 'left' | 'right' | 'top' | 'bottom' | 'double';
type TimeLinePositionStrategy = `${TimelineAxis}-${TimelineSidePosition}`;

declare class TimelinePositionControlService {
    /** @hidden */
    private _nodeItems;
    /** @hidden */
    private _positionStrategy;
    /** Calculate styles for timeline nodes */
    calculatePositions(): void;
    /** Set strategy for current axis and layout */
    setStrategy(strategy: TimeLinePositionStrategy): void;
    /** Register TimelineNodeComponent */
    registerNode(node: TimelineNodeComponentInterface): void;
    /** Remove TimelineNodeComponent */
    removeNode(node: TimelineNodeComponentInterface): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelinePositionControlService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<TimelinePositionControlService>;
}

declare class TimelineComponent<T> implements OnInit, OnDestroy, OnChanges, AfterViewInit {
    private _differs;
    private _cd;
    private _timelinePositionControlService;
    private _elementRef;
    /**
     * Data array to render
     */
    dataSource: T[];
    /**
     * Tracking function that will be used to check the differences in data changes.
     */
    trackBy: TrackByFunction<T>;
    /**
     * Axis for timeline
     */
    axis: TimelineAxis;
    /**
     * Layout for timeline
     */
    layout: TimelineSidePosition;
    /** @hidden */
    _loadingTemplate: TemplateRef<any>;
    /** @hidden */
    private _firstListOutlet;
    /** @hidden */
    private _secondListOutlet;
    /** The timeline node template for the timeline */
    /** @hidden */
    private _nodeDefs;
    /** @hidden */
    _canShowFirstList: boolean;
    /** @hidden */
    _canShowSecondList: boolean;
    /** @hidden */
    _loading: boolean;
    /** @hidden */
    readonly loadingRange: number[];
    /** @hidden
     * Differ used to find the changes in the data provided by the data source.
     */
    private _dataDifferForFirstList;
    /** @hidden */
    private _dataDifferForSecondList;
    /** @hidden */
    private readonly _onDestroy;
    /** @hidden */
    constructor(_differs: IterableDiffers, _cd: ChangeDetectorRef, _timelinePositionControlService: TimelinePositionControlService, _elementRef: ElementRef<HTMLElement>);
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngOnChanges(changes: SimpleChanges): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    ngOnDestroy(): void;
    /**
     * Update state by new data source
     * If the data source is null, interpret this by clearing the node outlet.
     */
    /** @hidden */
    private switchDataSource;
    /** Check for changes made in the data and render each change (node added/removed/moved). */
    /** @hidden */
    private _renderNodeChanges;
    /** @hidden */
    private _setPositionStrategy;
    /**
     * Create the embedded view for the data node template and place it in the correct index location
     * within the data node view container.
     */
    /** @hidden */
    private _insertNode;
    /**
     * Finds the matching node definition that should be used for this node data. If there is only
     * one node definition, it is returned.
     */
    /** @hidden */
    private _getNodeDef;
    /**
     * Split data list to two list first and second to represent timelines in two lists.
     */
    /** @hidden */
    private _splitList;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineComponent<any>, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TimelineComponent<any>, "fd-timeline", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "axis": { "alias": "axis"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; }, {}, ["_nodeDefs"], never, true, never>;
}

/** Context provided to the timeline node component. */
declare class TimelineNodeOutletContext<T> {
    /** Data for the node. */
    $implicit: T;
    /** Index location of the node. */
    index?: number;
    /** Length of the number of total dataNodes. */
    count?: number;
    /** @hidden */
    constructor(data: T);
}
declare class TimelineNodeDefDirective<T> {
    template: TemplateRef<any>;
    /** Data passed to the template*/
    fdTimelineNodeData: T;
    /** @hidden */
    constructor(template: TemplateRef<any>);
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeDefDirective<any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineNodeDefDirective<any>, "[fdTimelineNodeDef], [fd-timeline-node-def]", never, { "fdTimelineNodeData": { "alias": "fdTimelineNodeData"; "required": false; }; }, {}, never, never, true, never>;
}

declare class TimelineNodeHeaderDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeHeaderDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineNodeHeaderDirective, "fd-timeline-node-header", never, {}, {}, never, never, true, never>;
}

declare class TimelineNodeHeaderInfoDirective {
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeHeaderInfoDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineNodeHeaderInfoDirective, "fd-timeline-node-header-info", never, {}, {}, never, never, true, never>;
}

declare class TimelineNodeBodyComponent {
    /** Text content of timeline node*/
    content: string;
    /**
     * The number of lines to be visible.
     * If user doesn't provide it, all lines will be visible
     */
    maxLines: number;
    /** @hidden */
    private readonly _injector;
    /** @hidden */
    private readonly _timelinePositionControlService;
    /** @hidden */
    calculatePositions(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeBodyComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TimelineNodeBodyComponent, "fd-timeline-node-body", never, { "content": { "alias": "content"; "required": false; }; "maxLines": { "alias": "maxLines"; "required": false; }; }, {}, never, never, true, never>;
}

declare class TimelineNodeFooterComponent {
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeFooterComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TimelineNodeFooterComponent, "fd-timeline-node-footer", never, {}, {}, never, ["*"], true, never>;
}

declare class TimelineNodeComponent implements TimelineNodeComponentInterface, OnInit, OnDestroy {
    el: ElementRef;
    private _timelinePositionControl;
    /** Glyph of the current timeline node.*/
    glyph: string;
    /** Glyph font family */
    glyphFont: IconFont;
    /** Aria label for the current timeline node. */
    ariaLabel: string;
    /** Reference to the line of timeline node*/
    lineEl: ElementRef;
    /** @hidden */
    constructor(el: ElementRef, _timelinePositionControl: TimelinePositionControlService);
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TimelineNodeComponent, "fd-timeline-node", never, { "glyph": { "alias": "glyph"; "required": false; }; "glyphFont": { "alias": "glyphFont"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, {}, never, ["*"], true, never>;
}

declare class TimelineNodeHeaderInfoTitleDirective {
    /** fd-timeline__post-header-title*/
    fdTimelineNodeHeaderInfoTitleClass: boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeHeaderInfoTitleDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineNodeHeaderInfoTitleDirective, "[fdTimelineNodeHeaderInfoTitle], [fd-timeline-node-header-info-title]", never, {}, {}, never, never, true, never>;
}

declare class TimelineNodeHeaderInfoTextDirective {
    /** add/remove fd-timeline__post-header-text class*/
    fdTimelineNodeHeaderInfoTextClass: boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineNodeHeaderInfoTextDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineNodeHeaderInfoTextDirective, "[fdTimelineNodeHeaderInfoText], [fd-timeline-node-header-info-text]", never, {}, {}, never, never, true, never>;
}

declare class TimelineHeaderInfoSubTitleDirective {
    /** add/remove fd-timeline__post-subheader class*/
    fdTimelineNodeHeaderInfoSubTitleClass: boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineHeaderInfoSubTitleDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineHeaderInfoSubTitleDirective, "[fdTimelineHeaderInfoSubTitle], [fd-timeline-header-info-sub-title]", never, {}, {}, never, never, true, never>;
}

/**
 * @deprecated
 * Use direct imports of `TimelineComponent`,
    `TimelineNodeDefDirective`,
    `TimelineNodeHeaderComponent`,
    `TimelineNodeHeaderInfoComponent`,
    `TimelineNodeBodyComponent`,
    `TimelineNodeFooterComponent`,
    `TimelineNodeComponent`,
    `TimelineNodeHeaderInfoTitleDirective`,
    `TimelineNodeHeaderInfoTextDirective`,
    `TimelineHeaderInfoSubTitleDirective`
 */
declare class TimelineModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<TimelineModule, never, [typeof TimelineComponent, typeof TimelineNodeDefDirective, typeof TimelineNodeHeaderDirective, typeof TimelineNodeHeaderInfoDirective, typeof TimelineNodeBodyComponent, typeof TimelineNodeFooterComponent, typeof TimelineNodeComponent, typeof TimelineNodeHeaderInfoTitleDirective, typeof TimelineNodeHeaderInfoTextDirective, typeof TimelineHeaderInfoSubTitleDirective], [typeof TimelineComponent, typeof TimelineNodeDefDirective, typeof TimelineNodeHeaderDirective, typeof TimelineNodeHeaderInfoDirective, typeof TimelineNodeBodyComponent, typeof TimelineNodeFooterComponent, typeof TimelineNodeComponent, typeof TimelineNodeHeaderInfoTitleDirective, typeof TimelineNodeHeaderInfoTextDirective, typeof TimelineHeaderInfoSubTitleDirective]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<TimelineModule>;
}

declare class TimelineFirstListOutletDirective {
    viewContainer: ViewContainerRef;
    /** Ref to ViewContainerRef instance*/
    constructor(viewContainer: ViewContainerRef);
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineFirstListOutletDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineFirstListOutletDirective, "[fdTimelineFirstListOutlet], [fd-timeline-first-list-outlet]", never, {}, {}, never, never, true, never>;
}

declare class TimelineSecondListOutletDirective {
    viewContainer: ViewContainerRef;
    /** Ref to ViewContainerRef instance*/
    constructor(viewContainer: ViewContainerRef);
    static ɵfac: i0.ɵɵFactoryDeclaration<TimelineSecondListOutletDirective, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<TimelineSecondListOutletDirective, "[fdTimelineSecondListOutlet], [fd-timeline-second-list-outlet]", never, {}, {}, never, never, true, never>;
}

declare abstract class BaseStrategy {
    /** Calculate styles for timeline nodes */
    abstract calculateStyles(nodes: TimelineNodeComponentInterface[]): any;
    /** Offset between nodes lines */
    private readonly SMALL_OFFSET;
    /** Offset between nodes lines with icon */
    private readonly BIG_OFFSET;
    /** Offset for second list in within vertical axis */
    private readonly VERTICAL_TOP_LIST_OFFSET;
    /** @hidden */
    protected _getOffset(node: TimelineNodeComponentInterface): number;
    /** @hidden */
    protected _getTwoListFromOne(nodes: TimelineNodeComponentInterface[]): [TimelineNodeComponentInterface[], TimelineNodeComponentInterface[]];
    /** @hidden */
    protected _setStylesForSingleList(nodes: TimelineNodeComponentInterface[], axis: TimelineAxis): void;
    /** @hidden */
    protected _setStylesForDoubleList(nodes: TimelineNodeComponentInterface[], axis: TimelineAxis): void;
}

declare class HorizontalDoubleSidesStrategy extends BaseStrategy {
    /** Calculate styles for timeline nodes */
    calculateStyles(nodes: TimelineNodeComponentInterface[]): any;
}

declare class HorizontalSingleSideStrategy extends BaseStrategy {
    /** Calculate styles for timeline nodes */
    calculateStyles(nodes: TimelineNodeComponentInterface[]): any;
}

declare class PositionStrategyFactory {
    /** Get timeline position strategy */
    static getStrategy(strategy: TimeLinePositionStrategy): BaseStrategy;
}

declare class VerticalDoubleSidesStrategy extends BaseStrategy {
    /** Calculate styles for timeline nodes */
    calculateStyles(nodes: TimelineNodeComponentInterface[]): void;
}

declare class VerticalSingleSideStrategy extends BaseStrategy {
    /** Calculate styles for timeline nodes */
    calculateStyles(nodes: TimelineNodeComponentInterface[]): void;
}

export { BaseStrategy, HorizontalDoubleSidesStrategy, HorizontalSingleSideStrategy, PositionStrategyFactory, TimelineComponent, TimelineFirstListOutletDirective, TimelineHeaderInfoSubTitleDirective, TimelineModule, TimelineNodeBodyComponent, TimelineNodeComponent, TimelineNodeDefDirective, TimelineNodeFooterComponent, TimelineNodeHeaderDirective, TimelineNodeHeaderInfoDirective, TimelineNodeHeaderInfoTextDirective, TimelineNodeHeaderInfoTitleDirective, TimelineNodeOutletContext, TimelinePositionControlService, TimelineSecondListOutletDirective, VerticalDoubleSidesStrategy, VerticalSingleSideStrategy };
export type { TimeLinePositionStrategy, TimelineAxis, TimelineSidePosition };
