import type { WidgetProps } from '../../../domains/widgets/components/widget/types'; /** * How the dashboard holding narrative widgets is open, so that each narrative requests the same * dashboard instance by id. * * @example * ```ts * const options: NarrativeRequestOptions = { sharedMode: true, adminAccess: false }; * ``` * @group Dashboards * @sisenseInternal */ export interface NarrativeRequestOptions { /** The dashboard is open in shared mode (co-authoring). */ sharedMode?: boolean; /** The dashboard is open through Admin Access. */ adminAccess?: boolean; } /** * Sets the request options on the dashboard's narrative widget from how the dashboard is open. A * dashboard normally holds one; any other narrative widget gets the same options. A value the * widget already carries is kept. * * @example * Mark the narrative widget of a dashboard built with `toDashboardProps`. * ```ts * const props = dashboardModelTranslator.toDashboardProps(dashboardModel); * const widgets = withNarrativeRequestOptions({ sharedMode, adminAccess })(props.widgets); * ``` * @param options - How the dashboard is open. * @returns Transformer of the widget props: the same list, with the options that are true set on * the narrative widget; the input when no option is true or there is no narrative widget. * @group Dashboards * @sisenseInternal */ export declare const withNarrativeRequestOptions: (options: NarrativeRequestOptions) => (widgets: readonly WidgetProps[]) => WidgetProps[];