import { Tab } from '../../tab'; import { SidecarModeFilter } from './modes'; import { MetadataBearing } from '../../../models/entity'; /** * This is the most complete form of a badge specification, allowing * the caller to provide a title, an onclick handler, and an optional * fontawesome icon representation. * */ export interface BadgeSpec { title: string; fontawesome?: string; image?: HTMLImageElement | SVGElement; css?: string; onclick?: () => void; } export type Badge = string | BadgeSpec | Element; /** * Interpretation: if the resource passes the given "when" filter, * then add the given sidecar badge * */ export interface BadgeRegistration { when: SidecarModeFilter; badge: BadgeSpec | ((resource: Resource, tab: Tab) => BadgeSpec); } /** registered badge handlers */ export declare const registrar: BadgeRegistration[]; /** * Register a new badge * */ export declare function registerSidecarBadge(registration: BadgeRegistration): void; export default registerSidecarBadge;