import type { Ref } from 'react'; import type { BaseProps, NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core'; interface QuickActionItemBase { /** Unique identifier for this shortcut. */ id: string; /** Display label shown on the shortcut. */ label: string; /** Optional subtitle displayed below the label. */ description?: string; /** Optional class name applied to the rendered shortcut card. */ className?: string; } interface QuickActionIcon { /** Icon name from the registered icon set. */ name: string; /** Optional icon container color. Overrides the theme; icon foreground is calculated for contrast. */ background?: string; } interface QuickActionWithIcon { /** Optional icon details. */ icon: QuickActionIcon; image?: never; } interface QuickActionWithImage { /** Optional image URL. Renders in place of the icon. */ image: string; icon?: never; } interface QuickActionWithoutVisual { icon?: undefined; image?: undefined; } type QuickActionVisual = QuickActionWithIcon | QuickActionWithImage | QuickActionWithoutVisual; export type QuickActionLinkItem = QuickActionItemBase & QuickActionVisual & { type: 'external'; href: string; }; export type QuickActionNavItem = QuickActionItemBase & QuickActionVisual & { type: 'page'; onClick: () => void; showExternalIcon?: boolean; }; export type QuickActionItem = QuickActionLinkItem | QuickActionNavItem; export interface QuickActionCategory { id: string; label: string; items: QuickActionItem[]; } interface QuickActionsWithItems { items?: QuickActionItem[]; categories?: never; } interface QuickActionsWithCategories { items?: never; categories: QuickActionCategory[]; } interface QuickActionsBaseProps extends NoChildrenProp, TestIdProp, BaseProps { heading?: string; showHeader?: boolean; variant?: 'stacked' | 'inline'; cardsPerRow?: 2 | 3 | 4; interactiveCards?: boolean; count?: number; onExpandToggle?: () => void; ref?: Ref; } export type QuickActionsProps = QuickActionsBaseProps & (QuickActionsWithItems | QuickActionsWithCategories); export {}; //# sourceMappingURL=QuickActions.types.d.ts.map