<!-- source-hash: 50c4ce7ece14f33f4a6cb6591ed66364 -->
A reusable React client component that renders context-aware empty state UI for vendors, posts, search results, or generic scenarios — with smart CTA logic that adapts based on the current URL path.

## Key Components

### `EmptyStateProps` Interface

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `type` | `'vendors' \| 'posts' \| 'search' \| 'generic'` | required | Determines default icon, title, and description |
| `title` | `string` | — | Overrides default title |
| `description` | `string` | — | Overrides default description |
| `showBackButton` | `boolean` | `false` | Renders an optional back button |
| `onGoBack` | `() => void` | — | Handler for the back button |
| `backButtonText` | `string` | `"Go Back"` | Back button label |
| `showCTA` | `boolean` | `true` | Toggles the smart CTA button |
| `ctaText` | `string` | — | Overrides smart CTA label |
| `onCtaClick` | `() => void` | — | Overrides smart CTA action |
| `ctaVariant` | `'primary' \| 'secondary'` | `'primary'` | CTA button styling |

### Internal Helpers

- **`getDefaultContent()`** — Returns icon, title, and description based on `type`
- **`getSmartCTA()`** — Derives CTA label and action from `type` + current pathname (e.g., resets filters on `/vendors` or `/blog`, navigates to `/vendors` from `/profile`)

## Usage Example

```typescript
// Basic usage
<EmptyState type="vendors" />

// Search with custom CTA
<EmptyState
  type="search"
  title="No results"
  description="Try different keywords."
  ctaText="Clear Search"
  onCtaClick={() => setQuery('')}
  ctaVariant="secondary"
/>

// With back button, no CTA
<EmptyState
  type="posts"
  showCTA={false}
  showBackButton={true}
  onGoBack={() => router.back()}
  backButtonText="Return to Feed"
/>
```

> **Smart CTA behavior:** When no `ctaText`/`onCtaClick` is provided, the component inspects `window.location.pathname` to decide whether to reset URL filters or navigate to `/vendors` or `/blog`.