import { AppSettings } from '../../../../../infra/app/settings/settings.js'; import type { AreaStyleOptions, AxisLabel, CompleteThemeSettings, DataLimits, IndicatorStyleOptions, LegendOptions, LineStyleOptions, LineWidth, Markers, Navigator, PieStyleOptions, SeriesLabels, WidgetStyleOptions } from '../../../../../types.js'; import type { AxisStyle, CartesianWidgetStyle, WidgetDesign, WidgetStyle, WidgetSubtype } from '../types.js'; /** * Maps SDK legend options to Fusion DTO legend style. * * @internal */ export declare function toLegendStyle(legend?: LegendOptions): CartesianWidgetStyle['legend']; /** * Maps SDK axis label options to Fusion DTO axis style. * Fields not stored in SDK (ticks, inactive) use sensible defaults. * * @internal */ export declare function toAxisStyle(axisLabel?: AxisLabel): AxisStyle; /** * Maps SDK series labels to Fusion DTO labels style. * For line charts (non-stacked), only enabled and rotation are restored. * * @internal */ export declare function toSeriesLabelsStyle(seriesLabels?: SeriesLabels): CartesianWidgetStyle['seriesLabels']; /** * Maps SDK navigator options to Fusion DTO navigator style. * scrollerLocation is not written back (stored in widget.options). * * @internal */ export declare function toNavigatorStyle(navigator?: Navigator): CartesianWidgetStyle['navigator']; /** Allowed line width tokens for CartesianWidgetStyle (thin=1, bold=3, thick=5). */ declare const LINE_WIDTH_TOKENS: readonly ["thin", "bold", "thick"]; export type LineWidthToken = (typeof LINE_WIDTH_TOKENS)[number]; /** * Maps SDK line width options to Fusion DTO line width style. * Validates string tokens and maps numeric widths to 'thin' | 'bold' | 'thick'. * * @internal */ export declare function toLineWidthStyle(lineWidth?: LineWidth | { width?: string | number; }): CartesianWidgetStyle['lineWidth']; /** * Maps SDK markers options to Fusion DTO markers style. * * @internal */ export declare function toMarkersStyle(markers?: Markers): CartesianWidgetStyle['markers']; /** * Maps SDK data limits to Fusion DTO data limits. * * @internal */ export declare function toDataLimitsStyle(dataLimits?: DataLimits): CartesianWidgetStyle['dataLimits']; /** * Returns true when {@link WidgetModel.styleOptions} carries any widget container / design * field that was produced by {@link getFlattenWidgetDesign} (and should be written back). * * @internal */ export declare function hasWidgetContainerStyleFields(styleOptions: WidgetStyleOptions): boolean; /** * Rebuilds Fusion `style.widgetDesign` from flattened container options (inverse of * {@link getFlattenWidgetDesign}). * * Missing fields default to the corresponding values from `themeSettings.widget` so that * the resulting {@link WidgetDesign} is always fully populated which is critical for the widget design feature in Fusion. * * @internal */ export declare function toWidgetDesign(styleOptions: WidgetStyleOptions, widgetTheme: CompleteThemeSettings['widget']): WidgetDesign | undefined; /** * Attaches `style.widgetDesign` built from widget container fields in `styleOptions`. * When the feature flag is off, or when `styleOptions` carries no container fields, the * base style is returned unchanged. * * @param baseStyle - The base style to be attached with the widget design * @param styleOptions - The style options to be used for the widget design * @param themeSettings - The theme settings to be used for the widget design * @param appSettings - The application settings to be used for the widget design * @returns The widget style with the widget design */ export declare function withWidgetDesign(baseStyle: WidgetStyle, styleOptions: WidgetStyleOptions, themeSettings: CompleteThemeSettings, appSettings?: AppSettings): WidgetStyle; /** * Maps SDK pie chart style options to Fusion PieWidgetStyle (DTO). * Inverse of {@link extractPieChartStyleOptions}. * * @param styleOptions - Pie style options from WidgetModel.styleOptions * @returns Fusion PieWidgetStyle for the widget DTO * @internal */ export declare function toPieWidgetStyle(styleOptions: PieStyleOptions): WidgetStyle; /** * Maps SDK indicator style options to Fusion IndicatorWidgetStyle (DTO). * Inverse of {@link extractIndicatorChartStyleOptions}. * * @param styleOptions - Indicator style options from WidgetModel.styleOptions * @returns Fusion IndicatorWidgetStyle for the widget DTO * @internal */ export declare function toIndicatorWidgetStyle(styleOptions: IndicatorStyleOptions): WidgetStyle; /** * Maps SDK line chart style options to Fusion CartesianWidgetStyle (DTO). * Used when serializing a line chart widget back to WidgetDto. * * @param styleOptions - Extracted line chart style options from WidgetModel.styleOptions * @returns Fusion CartesianWidgetStyle for the widget DTO * @internal */ export declare function toLineWidgetStyle(styleOptions: LineStyleOptions): CartesianWidgetStyle; /** * Converts area chart style options to Fusion CartesianWidgetStyle DTO. * Used when serializing an area chart widget back to WidgetDto. * * @param styleOptions - Area style options from WidgetModel.styleOptions * @param widgetSubtype - Resolved Fusion widget subtype (e.g. after `area/basic` default) * @returns Fusion CartesianWidgetStyle for the widget DTO */ export declare function toAreaWidgetStyle(styleOptions: AreaStyleOptions, widgetSubtype: WidgetSubtype): CartesianWidgetStyle; export {};