/** * Types for gx-ide-breadcrumb and gx-ide-breadcrumb-item. * @see docs/spec.md */ /** * Link data for a breadcrumb item that navigates to a URL. */ export interface ItemLink { url: string | undefined; } /** * How to render the optional start image (icon) of a breadcrumb item. */ export type StartImgType = "background" | "mask"; /** * Model for a single breadcrumb item. */ export interface BreadcrumbItemModel { id: string; caption?: string; accessibleName?: string; disabled?: boolean; link?: ItemLink; startImgSrc?: string; startImgType?: StartImgType; } /** * Model for the breadcrumb container: array of items. */ export type BreadcrumbModel = BreadcrumbItemModel[]; /** * Selected link descriptor for highlighting the current page in the breadcrumb. */ export interface SelectedLink { id?: string; link: ItemLink; } /** * Optional callback to resolve image path for an item (e.g. multi-state icons). * Returns an object with at least a base URL. */ export interface GxImageMultiState { base: string; } /** * Callback type for resolving item image path. */ export type GetImagePathCallback = (item: BreadcrumbItemModel) => GxImageMultiState | undefined;