<!-- source-hash: f8069e3f963f307b16a2d6ae310496d9 -->
Inline chat card component for rendering Data Room and OpenFrame-docs document references within the Flamingo/OpenFrame AI chat interface. Handles both `/data-room` and `/knowledge-base` route surfaces with a shared presentation layer.

## Key Components

### `DataRoomDocCard`
Primary card component. Renders as an interactive `<a>` element when `anchorProps` is provided, or a static `<span>` when no link is available. Displays document title, source badge, file path, and a preview excerpt.

### `DataRoomDocCardSkeleton`
Loading state placeholder matching the card's layout — used while document data is being fetched.

### `DataRoomDocCardAnchorProps`
Prop bundle interface for pre-composed anchor attributes (`href`, `target`, `rel`, `onClick`). URL composition and routing decisions are handled by the consumer, not this component.

### `DataRoomDocCardProps`
| Prop | Type | Notes |
|------|------|-------|
| `item` | `DataRoomDocCardItem` | Title, path, and preview text |
| `badgeText` | `string` | Required. Consumer-resolved source label (e.g. "Data Room", "Knowledge Base") |
| `anchorProps` | `DataRoomDocCardAnchorProps?` | When omitted, card renders non-interactive |
| `className` | `string?` | Additional CSS classes |

## Usage Example

```typescript
// Interactive card (linked)
<DataRoomDocCard
  item={{ title: 'Onboarding Guide', path: '/docs/onboarding.md', preview: 'Step-by-step...' }}
  badgeText={getSourceLabel(item.sourceRepo)}  // consumer resolves label
  anchorProps={{
    href: '/data-room/docs/abc123',
    target: '_blank',
    rel: 'noopener noreferrer',
  }}
/>

// Non-interactive card (no link resolved)
<DataRoomDocCard
  item={{ title: 'Policy Draft', path: null, preview: null }}
  badgeText="Knowledge Base"
/>

// Skeleton while loading
<DataRoomDocCardSkeleton />
```

> **Design note:** `badgeText` is required (no default) to prevent silent mislabeling — a document sourced from `openframe-docs` must never display "Data Room" due to its private/internal connotation. The consumer's `getSourceLabel()` resolver is the single source of truth for provenance labels.