import { JaqlDataSourceForDto } from '@sisense/sdk-data';
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../../../domains/query-execution/index.js';
import { ChartWidgetProps } from '../../../../domains/widgets/components/chart-widget/types';
import { CommonWidgetProps } from '../../../../domains/widgets/components/common-widget/types';
import { CustomWidgetProps } from '../../../../domains/widgets/components/custom-widget/types';
import { PivotTableWidgetProps } from '../../../../domains/widgets/components/pivot-table-widget/types';
import { TableWidgetProps } from '../../../../domains/widgets/components/table-widget/types';
import { TextWidgetProps } from '../../../../domains/widgets/components/text-widget/types';
import { WidgetDto } from '../../../../domains/widgets/components/widget-by-id/types.js';
import { WidgetProps } from '../../../../domains/widgets/components/widget/types';
import { AppSettings } from '../../../../infra/app/settings/settings.js';
import { ChartProps, PivotTableProps, TableProps } from '../../../../props';
import { CompleteThemeSettings } from '../../../../types.js';
import { WidgetModel } from '../widget-model';
/**
* Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
*
* @example
* ```tsx
* const {data, isLoading, isError} = useExecuteQuery(widgetModelTranslator.toExecuteQueryParams(widgetModel));
* ```
*
* Note: this method is not supported for getting pivot query.
* Use {@link toExecutePivotQueryParams} instead for getting query parameters for the pivot widget.
*/
export declare function toExecuteQueryParams(widgetModel: WidgetModel): ExecuteQueryParams;
/**
* Translates a {@link WidgetModel} to the parameters for executing a query for the pivot widget.
*
* @example
* ```tsx
* const {data, isLoading, isError} = useExecutePivotQuery(widgetModelTranslator.toExecutePivotQueryParams(widgetModel));
* ```
*
* Note: this method is supported only for getting pivot query.
* Use {@link toExecuteQueryParams} instead for getting query parameters for non-pivot widgets.
*/
export declare function toExecutePivotQueryParams(widgetModel: WidgetModel): ExecutePivotQueryParams;
/**
* Translates a {@link WidgetModel} to the props for rendering a chart.
*
* @example
* ```tsx
*
* ```
*
* Note: this method is not supported for pivot widgets.
* Use {@link toPivotTableProps} instead for getting props for the component.
*/
export declare function toChartProps(widgetModel: WidgetModel): ChartProps;
/**
* Translates a {@link WidgetModel} to the props for rendering a table.
*
* @example
* ```tsx
*
* ```
*
* Note: this method is not supported for chart and pivot widgets.
* Use {@link toChartProps} instead for getting props for the component.
* Use {@link toPivotTableProps} instead for getting props for the component.
*/
export declare function toTableProps(widgetModel: WidgetModel): TableProps;
/**
* Translates a {@link WidgetModel} to the props for rendering a pivot table.
*
* @example
* ```tsx
*
* ```
*
* Note: this method is not supported for chart or table widgets.
* Use {@link toChartProps} instead for getting props for the component.
* Use {@link toTableProps} instead for getting props for the component.
*/
export declare function toPivotTableProps(widgetModel: WidgetModel): PivotTableProps;
/**
* Translates a {@link WidgetModel} to the props for rendering a chart widget.
*
* @example
* ```tsx
*
* ```
*
* Note: this method is not supported for pivot widgets.
*/
export declare function toChartWidgetProps(widgetModel: WidgetModel): ChartWidgetProps;
/**
* Translates a {@link WidgetModel} to the props for rendering a table widget.
*
* @example
* ```tsx
*
* ```
*
* Note: this method is not supported for chart widgets.
* Use {@link toChartWidgetProps} instead for getting props for the component.
* @internal
*/
export declare function toTableWidgetProps(widgetModel: WidgetModel): TableWidgetProps;
/**
* Translates a {@link WidgetModel} to the props for rendering a pivot table widget.
*
* @example
* ```tsx
*
* ```
* Note: this method is not supported for chart or table widgets.
* Use {@link toChartWidgetProps} instead for getting props for the component.
*/
export declare function toPivotTableWidgetProps(widgetModel: WidgetModel): PivotTableWidgetProps;
/**
* Translates a {@link WidgetModel} to the props for rendering a text widget.
*
* @example
* ```tsx
*
* ```
*
* Note: this method is not supported for chart or pivot widgets.
* Use {@link toChartWidgetProps} instead for getting props for the component.
* Use {@link toPivotTableWidgetProps} instead for getting props for the component.
*/
export declare function toTextWidgetProps(widgetModel: WidgetModel): TextWidgetProps;
/**
* Translates a {@link WidgetModel} to the props for rendering a custom widget.
*
* @internal
*/
export declare function toCustomWidgetProps(widgetModel: WidgetModel): CustomWidgetProps;
/**
* Translates {@link WidgetModel} to {@link CommonWidgetProps}.
*
* @internal
*/
export declare function toCommonWidgetProps(widgetModel: WidgetModel): CommonWidgetProps;
/**
* Translates {@link WidgetModel} to {@link WidgetProps}.
*
* @example
* ```tsx
*
* ```
*/
export declare function toWidgetProps(widgetModel: WidgetModel): WidgetProps;
/**
* Creates a {@link WidgetModel} from a widget DTO.
*
* @param widgetDto - The widget DTO to be converted to a widget model
* @param themeSettings - The theme settings to be used for the widget model
* @param appSettings - The application settings to be used for the widget model
* @returns The widget model
* @internal
*/
export declare function fromWidgetDto(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): WidgetModel;
/**
* Creates a {@link WidgetModel} from a {@link ChartWidgetProps}.
*
* @param chartWidgetProps - The ChartWidgetProps to be converted to a widget model
* @returns WidgetModel
* @internal
*/
export declare function fromChartWidgetProps(chartWidgetProps: ChartWidgetProps): WidgetModel;
/**
* Creates a {@link WidgetModel} from a {@link WidgetProps}.
*
* @param widgetProps - The WidgetProps to be converted to a widget model
* @returns WidgetModel
* @internal
*/
export declare function fromWidgetProps(widgetProps: WidgetProps): WidgetModel;
/**
* Translates a {@link WidgetModel} to {@link WidgetDto}.
*
* @param widgetModel - The WidgetModel to be converted to a widgetDto
* @param dataSource - The full datasource details
* @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 WidgetDto
*
* @sisenseInternal
*/
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource?: JaqlDataSourceForDto, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): WidgetDto;