import { HookEnableParam } from '../../../shared/hooks/types';
import { WidgetModel } from './widget-model';
/**
 * Parameters for {@link useGetWidgetModel} hook.
 */
export interface GetWidgetModelParams extends HookEnableParam {
    /**
     * Identifier of the dashboard that contains the widget
     */
    dashboardOid: string;
    /**
     * Identifier of the widget to be retrieved
     */
    widgetOid: string;
}
/**
 * States of a widget model load.
 */
export type WidgetModelState = WidgetModelLoadingState | WidgetModelErrorState | WidgetModelSuccessState;
/**
 * State of a widget model that is loading.
 */
export type WidgetModelLoadingState = {
    /** Whether the widget model is loading */
    isLoading: true;
    /** Whether the widget model load has failed */
    isError: false;
    /** Whether the widget model load has succeeded */
    isSuccess: false;
    /** Error, if one occurred */
    error: undefined;
    /** Widget model, if the load succeeded */
    widget: WidgetModel | undefined;
    /** Loading status */
    status: 'loading';
};
/**
 * State of a widget model load that has failed.
 */
export type WidgetModelErrorState = {
    /** Whether the widget model is loading */
    isLoading: false;
    /** Whether the widget model load has failed */
    isError: true;
    /** Whether the widget model load has succeeded */
    isSuccess: false;
    /** Error, if one occurred */
    error: Error;
    /** Widget model, if the load succeeded */
    widget: undefined;
    /** Loading status */
    status: 'error';
};
/**
 * State of a widget model load that has succeeded.
 */
export type WidgetModelSuccessState = {
    /** Whether the widget model is loading */
    isLoading: false;
    /** Whether the widget model load has failed */
    isError: false;
    /** Whether the widget model load has succeeded */
    isSuccess: true;
    /** Error, if one occurred */
    error: undefined;
    /** Widget model, if the load succeeded */
    widget: WidgetModel;
    /** Loading status */
    status: 'success';
};
/**
 * React hook that retrieves an existing widget model from a Fusion instance.
 *
 * **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported.
 *
 * ## Example
 *
 * Retrieve a widget model and use it to populate a `Chart` component
 *
 * <iframe
 *  src='https://csdk-playground.sisense.com/?example=fusion-assets%2Fuse-get-widget-model&mode=docs'
 *  width='800'
 *  height='870'
 *  style='border:none;'
 * />
 *
 * Additional `useGetWidgetModel` examples:
 *
 * - [Modify Chart Type](https://www.sisense.com/developers/playground/?example=fusion-assets%2Fuse-get-widget-model-change-chart-type)
 *
 * @returns Widget load state that contains the status of the execution, the result widget model, or the error if one has occurred
 * @group Fusion Assets
 * @fusionEmbed
 */
export declare const useGetWidgetModel: (params: GetWidgetModelParams) => WidgetModelState;
/**
 * {@link useGetWidgetModel} without tracking to be used inside other hooks or components in Compose SDK.
 *
 * @param params - Parameters of the widget to be retrieved
 * @internal
 */
export declare function useGetWidgetModelInternal(params: GetWidgetModelParams): WidgetModelState;
