import { Model } from "@singularsystems/neo-core"; import ObservableElement from "../React/ObservableElement"; export interface IHeaderContext { /** Indicates that the trigger element is obscured by the header, or has scrolled past the top of the viewport. */ readonly isObscured: boolean; /** Indicates where the content will be placed in the header. */ readonly placementInHeader: PlacementInHeader; /** State that can be passed by the view to the header. */ state?: any; } export type PlacementInHeader = "inline" | "below"; /** Implemented by views that render content in the app header. */ export interface IHeaderPanelContributor { readonly placementInHeader?: PlacementInHeader; /** When this element is scrolled out of view, `renderInAppHeader()` will report that it is obscured. */ headerTriggerElement?: ObservableElement | undefined; /** * Content to be rendered in the app header. * Return undefined instead of an empty element when there is no content. */ renderInAppHeader(context: IHeaderContext): React.ReactNode | undefined; } export declare class HeaderContributorContext extends Model.ObservableStack { } export interface IHeaderContributorContextHost { headerContext: HeaderContributorContext; }