import { QueryResultData } from '@sisense/sdk-data';
import { type ClientApplication } from '../../../../infra/app/types';
import { ExecuteQueryByWidgetIdParams, QueryByWidgetIdQueryParams, QueryByWidgetIdState } from '../../types';
/**
 * React hook that executes a data query extracted from an existing widget in the Sisense instance.
 *
 * This approach, which offers an alternative to {@link ExecuteQueryByWidgetId} component, is similar to React Query's `useQuery` hook.
 *
 * **Note:** Widget extensions based on JS scripts and add-ons in Fusion are not supported.
 *
 * @example
 * The example below executes a query over the existing dashboard widget with the specified widget and dashboard OIDs.
 ```tsx
  const { data, isLoading, isError } = useExecuteQueryByWidgetId({
    widgetOid: '64473e07dac1920034bce77f',
    dashboardOid: '6441e728dac1920034bce737'
  });
  if (isLoading) {
    return <div>Loading...</div>;
  }
  if (isError) {
    return <div>Error</div>;
  }
  if (data) {
    return <div>{`Total Rows: ${data.rows.length}`}</div>;
  }
  return null;
 ```
 * See also hook {@link useExecuteQuery}, which execute a query specified in code.
 * @returns Query state that contains the status of the query execution, the result data, the constructed query parameters, or the error if any occurred
 * @group Fusion Assets
 * @fusionEmbed
 */
export declare const useExecuteQueryByWidgetId: (params: ExecuteQueryByWidgetIdParams) => QueryByWidgetIdState;
/**
 * {@link useExecuteQueryByWidgetId} without tracking to be used inside other hooks or components in Compose SDK.
 *
 * @param params - Parameters to identify the target widget
 * @internal
 */
export declare function useExecuteQueryByWidgetIdInternal(params: ExecuteQueryByWidgetIdParams): QueryByWidgetIdState;
/**
 * Checks if the query parameters have changed by deep comparison.
 *
 * @param params - New query parameters
 */
export declare function useParamsChanged(params: ExecuteQueryByWidgetIdParams): boolean;
/** @internal */
export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, includeDashboardFilters, app, onBeforeQuery, }: ExecuteQueryByWidgetIdParams & {
    app: ClientApplication;
}): Promise<{
    data: QueryResultData;
} & QueryByWidgetIdQueryParams>;
