# EmptyState - 空状态组件

## 说明

`EmptyState` 用于数据为空、加载失败、无搜索结果等场景的占位展示。支持 14 种预设插图类型、自定义插图、描述文本和操作按钮。

- 布局：垂直居中排列，顺序为 插图 → 描述 → 按钮
- 插图优先级：`customImage` > `imageType`（预设类型）
- 预设插图自动跟随系统 light/dark 模式（通过 `ConfigContext.colorScheme`）
- 描述、按钮均为可选，按需组合

## 入参（Props）

| 属性 | 说明 | 类型 | 默认值 | 必填 |
|------|------|------|--------|------|
| **imageType** | 预设插图类型 | `EmptyImageType` | `'message'` | 否 |
| **customImage** | 自定义插图（优先级高于 imageType） | `ReactElement` | - | 否 |
| **description** | 描述文本 | `string` | - | 否 |
| **showButton** | 是否显示操作按钮 | `boolean` | `false` | 否 |
| **buttonTitle** | 操作按钮文本 | `string` | - | 否 |
| **onButtonPress** | 操作按钮点击回调 | `() => void` | - | 否 |
| **imageWidth** | 插图宽度 | `number` | `92` | 否 |
| **imageHeight** | 插图高度 | `number` | `60` | 否 |

> 按钮渲染条件：`showButton` 为 `true` 且传入 `buttonTitle`。`onButtonPress` 可选。

## EmptyImageType 枚举

| 枚举值 | 说明 |
|--------|------|
| `Contacts` | 联系人为空 |
| `Image` | 图片为空 |
| `Message` | 消息为空 |
| `Device` | 设备为空 |
| `NoNetwork` | 无网络 |
| `Error` | 加载错误 |
| `Success` | 操作成功 |
| `Upgrade` | 需要升级 |
| `Download` | 下载为空 |
| `Countdown` | 倒计时 |
| `Schedule` | 日程为空 |
| `Alert` | 告警为空 |
| `Home` | 首页为空 |
| `List` | 列表为空 |

## 使用示例

```tsx
import { EmptyState, EmptyImageType } from 'miot/ui/hyperOSUI';

// 预设类型 + 按钮
<EmptyState
  imageType={EmptyImageType.NoNetwork}
  description="网络不可用"
  showButton
  buttonTitle="重试"
  onButtonPress={() => retry()}
/>

// 仅描述
<EmptyState description="暂无搜索结果" />

// 自定义插图
<EmptyState
  customImage={<CustomIcon />}
  description="自定义图片"
/>
```

## 设计 Token

| 元素 | 颜色 Token | 字体 Token |
|------|-----------|-----------|
| 描述 | `contentTertiaryNormal` | `fontSystem15Regular` |
| 按钮背景 | `fillSecondary` | - |
| 按钮文字 | `contentSecondaryNormal` | `fontSystem14Medium` |

间距：插图↔描述 `spacing12`，内容↔按钮 `spacing24`。容器 `paddingVertical: 40`。按钮圆角 `rounded`（999）。
