import { ComponentDescriptor, Icon } from '../core'; /** * Describes additional content a provider contributes to the problem * detail dialog. * * Providers return an array of these from {@link ProblemProvider.getViews} * to supply extra sections alongside the default detail panel. The platform * decides how to present them (tabs, panels, etc.). * * @example A view that renders the raw email * ```ts * import { ProblemView } from '@limetech/lime-web-components'; * * const view: ProblemView = { * id: 'raw-email', * label: 'Raw Email', * icon: 'email', * component: { * name: 'email-raw-content', * props: { messageId: 'msg-123' }, * }, * }; * ``` * * @see {@link ProblemProvider.getViews} * @see {@link ComponentDescriptor} * * @alpha * @group Problem */ export interface ProblemView { /** * Stable identifier for this view. * * Used by the platform to persist user state (e.g. last selected view) * and for deep-linking. Must be unique within a single provider. */ id: string; /** * Label identifying this view. */ label: string; /** * Icon for this view. * * @see {@link Icon} */ icon?: string | Icon; /** * Descriptor for the web component rendered inside this view. */ component: ComponentDescriptor; }