import * as i0 from '@angular/core';
import { AfterContentInit, OnDestroy, OnInit, ElementRef } from '@angular/core';
import { NavigationExtras } from '@angular/router';
import { Observable } from 'rxjs';

/**
 * @description
 * Component that provides a breadcrumb navigation.
 */
declare class EuiBreadcrumbComponent implements AfterContentInit, OnDestroy {
    string: string;
    /** Query list of breadcrumb items occurrences on the content */
    private breadcrumbItems;
    private vcr;
    private destroy$;
    /** Observable emitting when the breadcrumb Items List has changed */
    private breadcrumbItemsListChanged;
    private viewContainerRef;
    ngAfterContentInit(): void;
    ngOnDestroy(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<EuiBreadcrumbComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<EuiBreadcrumbComponent, "eui-breadcrumb", never, {}, {}, ["breadcrumbItems"], ["*"], true, never>;
}

declare class EuiBreadcrumbItemComponent implements OnDestroy, OnInit {
    string: string;
    /**
     * A unique id for the breadcrumb
     */
    id: string;
    /**
     * The label of the breadcrumbItem. It might get truncated if it's too long.
     */
    label: string;
    /**
     * The icon of the breadcrumbItem.
     */
    iconSvgName: string;
    ariaLabel: string;
    /**
     * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
     *   - **string**: shorthand for an array of commands with just the string, i.e. `['/route']`
     *   - **null|undefined**: Disables the link by removing the `href`
     */
    link: string | any[];
    /**
     * A fragment
     */
    navigationExtras: NavigationExtras;
    /** calculated item width */
    width: number;
    hasPrevious: boolean;
    hasNext: boolean;
    /** state of breadcrumb item in case of collapsed */
    collapsed: boolean;
    elementRef: ElementRef<any>;
    private previousCrumb;
    private nextCrumb;
    private host;
    private router;
    private cdr;
    private logService;
    ngOnInit(): void;
    ngOnDestroy(): void;
    destroy(): void;
    /**
     * set the previous breadcrumb item
     *
     * @param  breadcrumbItem The previous item to point to.
     */
    setPrevious(breadcrumbItem: EuiBreadcrumbItemComponent): void;
    /**
     * set the next breadcrumb item
     *
     * @param breadcrumbItem The next item to point to.
     */
    setNext(breadcrumbItem: EuiBreadcrumbItemComponent): void;
    /**
     * A callback to navigate to the given link using ng-router.
     *
     * @param event
     */
    onClick(): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<EuiBreadcrumbItemComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<EuiBreadcrumbItemComponent, "eui-breadcrumb-item", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "iconSvgName": { "alias": "iconSvgName"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "link": { "alias": "link"; "required": false; }; "navigationExtras": { "alias": "navigationExtras"; "required": false; }; }, {}, never, never, true, never>;
}

type ArrayElement<A> = A extends readonly (infer T)[] ? T : never;
type DeepWriteable<T> = {
    -readonly [P in keyof T]: DeepWriteable<T[P]>;
};
type Cast<X, Y> = X extends Y ? X : Y;
type FromEntries<T> = T extends [infer Key, any][] ? {
    [K in Cast<Key, string>]: Extract<ArrayElement<T>, [K, any]>[1];
} : {
    [key in string]: any;
};
type FromEntriesWithReadOnly<T> = FromEntries<DeepWriteable<T>>;
declare global {
    interface ObjectConstructor {
        fromEntries<T>(obj: T): FromEntriesWithReadOnly<T>;
    }
}
declare class BreadCrumbItem {
    /** A unique ID for each crumb linked to a page */
    id: string;
    /** The label of the crumb */
    label: string;
    /** A URL link. Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
     *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.
     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`
     *   - **null|undefined**: Disables the link by removing the `href`
     */
    get link(): string | any[];
    set link(link: string | any[]);
    /** Extras for Angular Router */
    navigationExtras?: NavigationExtras;
    private _link?;
}

declare class EuiBreadcrumbService {
    /**
     * An observable on which observers can be notified on breadcrumb changes
     */
    breadcrumbs$: Observable<BreadCrumbItem[]>;
    /**
     * A behavior subject to emit breadcrumb whenever that changes
     */
    private breadcrumbsSource$;
    /**
     * An array to hold BreadCrumbItem metadata used to render the BreadCrumbItem
     */
    private breadcrumb;
    constructor();
    /**
     * Adds a new BreadCrumbItem into the breadcrumb
     *
     * @param breadCrumbItem The BreadCrumbItem you want to insert in trail
     * @param [after] The ID of the BreadCrumbItem after given one will be inserted.
     * @param [removeAfter=false] All crumbs after given ID will be removed.
     * @throws Will throw an error if given after ID is not found on current trail.
     */
    addCrumb(breadCrumbItem: BreadCrumbItem, after?: string, removeAfter?: boolean): void;
    /**
     * Remove a BreadCrumbItem based on a given ID
     *
     * @param id Optional: The ID of BreadCrumbItem to be removed
     *           If no id provided then the last item will be popped.
     */
    removeCrumb(id?: string): void;
    /**
     * Update a specific entry in the data structure
     *
     * @param BreadCrumbItem The BreadCrumbItem to match and update
     * @throws Will throw an Error if BreadCrumbItem is not part of the breadcrumb
     */
    updateCrumb(item: BreadCrumbItem): void;
    /**
     * Returns current breadcrumb
     */
    getBreadcrumb(): BreadCrumbItem[];
    /**
     * Sets the breadcrumb
     */
    setBreadcrumb(breadcrumb: BreadCrumbItem[]): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<EuiBreadcrumbService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<EuiBreadcrumbService>;
}

declare const EUI_BREADCRUMB: readonly [typeof EuiBreadcrumbComponent, typeof EuiBreadcrumbItemComponent];

export { BreadCrumbItem, EUI_BREADCRUMB, EuiBreadcrumbComponent, EuiBreadcrumbItemComponent, EuiBreadcrumbService };
export type { ArrayElement, FromEntriesWithReadOnly };
//# sourceMappingURL=eui-components-eui-breadcrumb.d.ts.map
