import type { ComponentType } from 'react'; import type { FeatureStatus } from './debug'; export type FeatureConfig = T & { enabled?: boolean }; export type DebugFeatureListener = () => void; export interface DebugFeatureRenderProps { snapshot: TSnapshot; feature: DebugFeature; } // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyDebugFeature = DebugFeature; /** Provides feature list and change notifications to consumers (e.g., HubClient). */ export interface FeatureDataProvider { readonly features: AnyDebugFeature[]; subscribe(listener: DebugFeatureListener): () => void; } export interface DebugFeature { readonly status: FeatureStatus; name: string; label: string; setup: () => void | Promise; getSnapshot: () => TSnapshot; clear?: () => void; cleanup: () => void; subscribe?: (listener: DebugFeatureListener) => () => void; renderContent?: ComponentType>; badge?: () => { label: string; color: string } | null; }