# NotificationProvider

## Description

Context provider utility that manages notification state across your application. The NotificationProvider enables programmatic notification management by maintaining a centralized registry of active notifications and providing functions to display, manage, and dismiss them from anywhere in your component tree.

## Usage

### Basic Setup

```tsx
import { NotificationProvider, useNotification } from '@delightui/components';

// Wrap your app
<NotificationProvider>
  <App />
</NotificationProvider>

// Use in components
const { trigger, clear, removeNotification } = useNotification();
```

### Triggering Notifications

```tsx
// Basic notification
trigger({
  message: 'Success message!',
  duration: 3000
});

// With style
trigger({
  message: 'Error occurred!',
  duration: 5000,
  style: ToastNotificationStyleEnum.ERROR
});

// Persistent (no auto-dismiss)
trigger({
  message: 'Manual dismiss only',
  duration: 0
});
```

## API

### trigger(payload)
- `message` - React content to display
- `duration` - Auto-dismiss time in ms (0 = manual dismiss only)  
- `style` - Visual style (SUCCESS, ERROR, WARNING, INFO)

### clear()
Removes all notifications

### removeNotification(id)
Removes specific notification by ID

## Props

| Prop | Type | Required | Description |
|------|------|----------|-------------|
| `children` | `ReactNode` | Yes | Child components |

## Notes

- Place at application root level
- Notifications auto-generate unique IDs
- Duration 0 = no auto-dismiss
- Supports custom React content in messages