import { type SharedFormulaState, type UseGetSharedFormulaParams } from '@sisense/sdk-ui-preact'; import type { MaybeRefOrWithRefs } from '../types'; /** * A Vue composable function `useGetSharedFormula` for retrieving shared formulas from Sisense. * This function enables fetching a shared formula either by its unique OID or by its name and associated data source, * providing flexibility in how shared formulas are accessed. It manages the fetch operation's state, including loading, * success, and error states, offering a reactive way to integrate Sisense formulas into Vue applications. * * @param {MaybeRefOrWithRefs} params - Parameters for fetching the shared formula, including the formula's OID, * or its name and the data source. This allows for precise specification of the formula to be fetched, supporting dynamic * values through Vue refs for reactive fetching based on user interactions or other application states. * * @example * How to use `useGetSharedFormula` within a Vue component to fetch a shared formula: * ```vue * * * * ``` * * The composable returns an object with reactive properties to manage the state of the shared formula fetching process: * - `formula`: The fetched shared formula, which is `undefined` until the operation completes successfully, or `null` if not found. It can be either a `CalculatedMeasure` or `DimensionalCalculatedMeasure` based on the fetch result. * - `isLoading`: Indicates whether the fetch operation is currently in progress. * - `isError`: Indicates whether an error occurred during the fetch operation. * - `isSuccess`: Indicates whether the fetch operation completed successfully without any errors. * - `error`: Contains the error object if an error occurred during the fetch. * - `status`: The status of the fetch operation ('loading', 'success', or 'error'). * * This composable provides a streamlined, reactive approach to fetching shared formulas from Sisense, facilitating their integration into Vue applications for enhanced data analytics capabilities. * @group Fusion Assets * @fusionEmbed */ export declare const useGetSharedFormula: (params: MaybeRefOrWithRefs) => import("vue").ToRefs;