export interface SelectOption {
  value: string;
  label: string;
  helper?: string;
}

export interface ProjectStyleOption {
  value: string;
  label: string;
  description: string;
  image: string;
}

export const aspectRatioOptions: SelectOption[] = [
  { value: "16:9", label: "16:9", helper: "横屏" },
  { value: "9:16", label: "9:16", helper: "竖屏" },
  { value: "1:1", label: "1:1", helper: "方屏" },
];

export const resolutionOptions: SelectOption[] = [
  { value: "720p", label: "720p", helper: "标清" },
  { value: "1080p", label: "1080p", helper: "高清" },
  { value: "4K", label: "4K", helper: "超清" },
];

export const projectStyleOptions: ProjectStyleOption[] = [
  {
    value: "live_action_drama",
    label: "真人短剧视觉",
    description: "真人演员质感，贴近短剧成片观感，服装与人物比例更写实。",
    image: "https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?w=400&h=300&fit=crop",
  },
  {
    value: "japanese_anime",
    label: "2D日漫",
    description: "日系动画角色设计，线条干净，赛璐璐上色，角色辨识度高。",
    image: "https://images.unsplash.com/photo-1519608487953-e999c86e7455?w=400&h=300&fit=crop",
  },
  {
    value: "korean_webtoon",
    label: "2D韩漫都市",
    description: "韩漫都市感，时装感更强，光影柔和，适合情感与都市题材。",
    image: "https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?w=400&h=300&fit=crop",
  },
  {
    value: "chinese_anime",
    label: "2D国漫",
    description: "国漫人物设定，造型更利落，兼顾东方气质与动画表现力。",
    image: "https://images.unsplash.com/photo-1514539079130-25950c84af65?w=400&h=300&fit=crop",
  },
  {
    value: "chinese_fantasy_3d",
    label: "3D国风仙侠",
    description: "三维国风与仙侠质感，服饰层次更丰富，适合奇幻与古风项目。",
    image: "https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=400&h=300&fit=crop",
  },
  {
    value: "cg_cinematic",
    label: "CG电影感",
    description: "高质感 CG 角色设定，偏电影海报与游戏宣传级别的视觉效果。",
    image: "https://images.unsplash.com/photo-1516035069371-29a1b244cc32?w=400&h=300&fit=crop",
  },
];

const projectStyleLabelMap = new Map(projectStyleOptions.map((option) => [option.value, option.label]));
const aspectRatioLabelMap = new Map(
  aspectRatioOptions.map((option) => [option.value, option.helper ? `${option.label} ${option.helper}` : option.label])
);
const resolutionLabelMap = new Map(
  resolutionOptions.map((option) => [option.value, option.helper ? `${option.label} ${option.helper}` : option.label])
);

export function getProjectStyleLabel(style?: string | null): string {
  if (!style) return "未设置";
  return projectStyleLabelMap.get(style) ?? style;
}

export function getAspectRatioLabel(aspectRatio?: string | null): string {
  if (!aspectRatio) return "未设置";
  return aspectRatioLabelMap.get(aspectRatio) ?? aspectRatio;
}

export function getResolutionLabel(resolution?: string | null): string {
  if (!resolution) return "未设置";
  return resolutionLabelMap.get(resolution) ?? resolution;
}
