import { type CustomWidgetComponentProps, type GenericDataOptions } from '@sisense/sdk-ui-preact'; import type { Component, DefineComponent } from 'vue'; /** Re-export related types */ export type { CustomWidgetComponentProps, GenericDataOptions }; /** * Type representing a Vue component that can be used as a user-defined custom widget. * This can be a Vue component options object, a defineComponent result, or any valid Vue component. */ export type CustomWidgetComponent = Component | DefineComponent; /** * Vue composable function for working with custom widgets * * @example * How to use `useCustomWidgets` to register a custom widget in a dashboard: * ```vue * ``` * * @group Dashboards */ export declare const useCustomWidgets: () => { /** * Registers a new custom widget. * * @param customWidgetType - The unique identifier for the custom widget type. * @param customWidget - The custom widget component to register. */ registerCustomWidget: = CustomWidgetComponentProps>(customWidgetType: string, customWidget: CustomWidgetComponent) => void; /** * Unregisters a custom widget for the given type name. * * @param customWidgetType - The unique identifier for the custom widget type. */ unregisterCustomWidget: (customWidgetType: string) => void; /** * Checks if a custom widget is registered. * * @param customWidgetType - The type of the custom widget. * @returns True if the custom widget is registered, false otherwise. */ hasCustomWidget: (customWidgetType: string) => boolean; };