import type { JsonLd } from '@atlaskit/json-ld-types/jsonld'; import type { AnalyticsOrigin } from '../../utils/types'; import type { CardActionOptions, CardInnerAppearance } from '../../view/Card/types'; export interface LinkAction { /** * Unique ID for the action. * @example `delete-action` */ id: string; /** * Promise to invoke on triggering this action. * @example Clicking on `Delete` leading to deletion of content. */ invoke: () => Promise; /** * Text to render for the action. * @description Use this in tooltips and UI. * @example `Delete`. */ text: React.ReactNode; } export interface UseSmartLinkActionsOpts { /** * Configure the visiblity of actions */ actionOptions?: CardActionOptions; /** * Appearance under which these actions will be invoked. * @example `block` for card views. */ appearance: CardInnerAppearance; /** * Smart link origin that the action being invoked from. */ origin?: AnalyticsOrigin; /** * Platform on which actions are being invoked. * @default 'web' */ platform?: JsonLd.Primitives.Platforms; /** * Whether to prefetch the link. * @default false */ prefetch?: boolean; /** * Smart Link URL for which actions will be invoked. * @example https://start.atlassian.com */ url: string; } export declare function useSmartLinkActions({ url, appearance, origin, actionOptions, prefetch, }: UseSmartLinkActionsOpts): LinkAction[];