# SConfirmModal

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

### SConfirmModal

#### Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `open?` | `boolean` | — |  |
| `persistent?` | `boolean` | `false` | 백드롭·ESC로 안 닫히고 흔들림 (sd-modal-container persistent). **기본값 false** — 확인 모달은 잃을 입력이 없어 백드롭·ESC로 닫힌다 |
| `type?` | `SConfirmModalType` | `'positive'` | 타입 (아이콘·메인버튼 색 결정) |
| `modalTitle?` | `string` | `''` |  |
| `titleClass?` | `string` | — | 제목 엘리먼트에 추가할 클래스 (sd-confirm-modal titleClass) |
| `topMessage?` | `string[]` | `[]` | 콘텐츠 박스 상단 메시지 목록 (각 항목이 한 줄, HTML 문자열 허용 — innerHTML 렌더링) |
| `bottomMessage?` | `string[]` | `[]` | 콘텐츠 박스 하단 메시지 목록 (각 항목이 한 줄, HTML 문자열 허용 — innerHTML 렌더링) |
| `tagLabel?` | `string` | — | tag 슬롯 기본 태그 레이블 (tagSlot 미지정 시) |
| `tagShape?` | `STagShape` | `'square'` | 태그 프리셋 (shape/size/color) — sd-confirm-modal tagPreset 대응 |
| `tagSize?` | `STagSize` | `'sm'` |  |
| `tagColor?` | `STagColor` | `'grey'` |  |
| `slotLabel?` | `string` | — | 콘텐츠 박스에서 태그 오른쪽에 오는 텍스트 (optionSlot 미지정 시) |
| `tagSlot?` | `ReactNode` | — | 콘텐츠 박스 tag 위치 커스텀 콘텐츠 (미지정 시 tagLabel 기반 STag) |
| `optionSlot?` | `ReactNode` | — | 콘텐츠 박스에서 태그 오른쪽 커스텀 콘텐츠 (미지정 시 slotLabel 텍스트) |
| `contentSlot?` | `ReactNode` | — | 콘텐츠 박스 바로 아래에 통으로 들어가는 커스텀 콘텐츠 (전체 폭) |
| `mainButtonLabel?` | `string` | `'확인'` | 메인 버튼 |
| `mainButtonName?` | `ConfirmModalMainButton` | — | 확인 버튼 프리셋 (없으면 type에 따라 자동 결정) |
| `subButtonLabel?` | `string` | — | 서브(취소) 버튼 |

#### Events

| Event | Type | Description |
|-------|------|-------------|
| `onOpenChange` | `(open: boolean) => void` |  |
| `onOk` | `() => void` | 확인 버튼 클릭 (sdOk) |
| `onCancel` | `() => void` |  |
| `onClose` | `() => void` | 닫기(X) 버튼 클릭 (sdClose) |

## Dependencies

### Used by

 - [SModal](../SModal)

### Depends on

- [SButton](../SButton)
- [SIcon](../SIcon)
- [SModalContainer](../SModalContainer)
- [STag](../STag)

### Graph

```mermaid
graph TD;
  SConfirmModal --> SButton
  SConfirmModal --> SIcon
  SConfirmModal --> SModalContainer
  SConfirmModal --> STag
  SModal --> SConfirmModal
  style SConfirmModal fill:#f9f,stroke:#333,stroke-width:4px
```
