// ============================================================
// constants.ts — 无限画布常量配置
// ============================================================

import type { StageType } from '../stores/useCanvasStore';

// ---------- 布局 ----------

/** 网格模式：默认列数 */
export const DEFAULT_COLS = 9;
/** 网格模式：每页行数 */
export const DEFAULT_ROWS_PER_PAGE = 16;
/** 单行模式：每页镜头数 */
export const DEFAULT_SINGLE_ROWS = 16;

/** 缩略图卡片尺寸（像素） */
export const ITEM_W = 160;
export const ITEM_H = 120;
export const ITEM_SPACING = 8;

/** 行标签宽度（single 模式） */
export const ROW_LABEL_WIDTH = 80;

/** 单页最大渲染数量（硬上限） */
export const MAX_ITEMS_PER_PAGE = 500;

// ---------- LOD 缩略图 ----------

/** LOD 级别 → 像素尺寸 */
export const LOD_LEVELS = [512, 1024, 2048, 4096] as const;
export type LODLevel = (typeof LOD_LEVELS)[number];

/** 最大并发缩略图加载数 */
export const MAX_CONCURRENT_LOADS = 10;

// ---------- 阶段配置 ----------

export interface StageConfig {
    key: StageType;
    label: string;
    icon: string;
    auditEnabled: boolean;
}

/** 六个阶段的静态配置 */
export const STAGE_CONFIGS: StageConfig[] = [
    { key: 'Assets', label: '资产', icon: '📦', auditEnabled: false },
    { key: 'Storyboard', label: '分镜', icon: '🎬', auditEnabled: true },
    { key: 'Keyframe', label: '关键帧', icon: '🖼️', auditEnabled: true },
    { key: 'Video', label: '视频', icon: '🎥', auditEnabled: true },
    { key: 'Audio', label: '音频', icon: '🎵', auditEnabled: false },
    { key: 'LipSync', label: '口型', icon: '👄', auditEnabled: false },
];

// ---------- 审核状态 ----------

export const AUDIT_STATUS_LABELS: Record<string, string> = {
    all: '全部',
    pending: '待审核',
    approved: '已通过',
    rework: '需返工',
    deprecated: '已废弃',
};

export const AUDIT_STATUS_COLORS: Record<string, string> = {
    pending: '#FAAD14',
    approved: '#52C41A',
    rework: '#FF4D4F',
    deprecated: '#8C8C8C',
};
