<!-- source-hash: cf04b71bf17cf6b35fdcdc036bdc8b09 -->
Storybook stories for the `AnnouncementBar` component, providing isolated visual variants with mocked API responses and localStorage state to simulate the full announcement lifecycle without a real backend.

## Key Components

| Export | Description |
|--------|-------------|
| `mockAnnouncement()` | Helper that intercepts `window.fetch` to return mock announcement data and clears dismiss flags from `localStorage` |
| `Default` | Basic announcement with icon and description using the Flamingo yellow (`#FFD951`) background |
| `WithCTA` | Announcement with a fully configured call-to-action button opening in a new tab |
| `WithCTASameTab` | CTA variant targeting `_self` for same-tab navigation |
| `BlueBackground` / `GreenBackground` | Color theme variants |
| `WithOpenFrameLogo` | Uses the `openframe-logo` SVG icon with a branded CTA |
| `WithPNGIcon` | Tests PNG icon rendering via `icon_png_url` |
| `LongContent` | Stress-tests truncation behavior on long titles and descriptions |
| `NoAnnouncement` | Renders with `null` announcement to verify the bar hides itself |

## Usage Example

```typescript
// How the fetch mock works in each story decorator
const cleanup = mockAnnouncement({
  id: 'story-1',
  title: 'New Feature Released',
  description: 'Check out our latest updates.',
  background_color: '#FFD951',
  icon_type: 'svg',
  icon_svg_name: 'rocket',
  platform_id: 'openframe',
  is_active: true,
  created_at: new Date().toISOString(),
  updated_at: new Date().toISOString(),
})

// The mock intercepts /api/announcements/active
// and returns the provided announcement object.
// Pass null to simulate no active announcement.
mockAnnouncement(null)
```

## Notes

- All stories use the `fullscreen` layout to replicate the top-of-page bar context
- The `mockAnnouncement` helper automatically restores `window.fetch` and removes `localStorage` dismiss keys to prevent state leaking between story renders
- `autodocs` is enabled, generating a component API table from the `Announcement` type