// Helper to read object's properties as obj['name']
export type ObjectPropByName = Record<string, any>;

/**
 * Data for a "Page Link" in the BottomBar and other UI elements
 */
export type LinkToPage = {
  icon?: string; // Icon name to use as <AppIcon icon={icon} />
  path?: string; // URL to navigate to
  title?: string; // Title or primary text to display
  subtitle?: string; // Sub-title or secondary text to display
  onSelect?: () => void; // When set, BottomBar runs this instead of navigating
  badgeCount?: number; // Renders a small unread-count badge on the item's icon when > 0 (e.g. the support entry)
  /**
   * Extra locale-less path prefixes this tab owns for active-state purposes. A group root
   * (`/nurse/finance`) is a real page, but the destinations it links to keep their historical
   * URLs (`/nurse/earnings`, `/nurse/bank`) — without this the plain longest-prefix match would
   * light up the `/nurse` tab on every one of them.
   */
  matchPaths?: string[];
};
