# SToast

> 자동 생성 문서 — `npm run docs:gen`. 소스: 각 컴포넌트의 Props/Handle 인터페이스 + import 의존성.

### SToastContainer

#### Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `position?` | `SToastPosition` | `'bottom-center'` |  |
| `maxVisible?` | `number` | `3` |  |
| `defaultDuration?` | `number` | `4000` | 자동 닫힘 기본 지연(ms) |
| `zIndex?` | `number` | `Z_INDEX.toast` | 스택 z-index. 기본값(1100)은 모달 호스트(1000) 위 — 토스트는 전역 알림이라 항상 최상단 |

#### Events

| Event | Type | Description |
|-------|------|-------------|
| `onShow` | `(payload: { id: string }) => void` | 토스트가 표시될 때 (sdToastShow) |
| `onDismiss` | `(payload: { id: string }) => void` | 토스트가 제거될 때 (sdToastDismiss) |

#### Methods (ref)

| Method | Type | Description |
|--------|------|-------------|
| `create` | `(options: SToastNotifyOptions) => string` |  |
| `dismiss` | `(id: string) => void` |  |
| `dismissAll` | `() => void` |  |

### SToast

#### Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `icon?` | `SIconName` | — | 좌측 아이콘 |
| `message` | `string` | — | 메시지 |
| `link?` | `string` | — | 우측 링크 URL |
| `linkLabel?` | `string` | — | 링크 레이블 (없으면 URL) |
| `buttonLabel?` | `string` | — | 우측 버튼 레이블 |
| `useClose?` | `boolean` | `false` | 닫기 버튼 표시 |
| `type?` | `SToastType` | `'default'` | 타입(색상/프리셋) |
| `className?` | `string` | — |  |
| `style?` | `CSSProperties` | — |  |

#### Events

| Event | Type | Description |
|-------|------|-------------|
| `onClose` | `() => void` | 닫기 (sdClose) |
| `onButtonClick` | `(e: MouseEvent) => void` | 버튼 클릭 (sdButtonClick) |

## Dependencies

### Depends on

- [SButton](../SButton)
- [SGhostButton](../SGhostButton)
- [SIcon](../SIcon)

### Graph

```mermaid
graph TD;
  SToast --> SButton
  SToast --> SGhostButton
  SToast --> SIcon
  style SToast fill:#f9f,stroke:#333,stroke-width:4px
```
