import { getClientURL }   from '@/tools';
import type { Component } from 'vue';


const ShadeTongueUp = defineAsyncComponent(() => import('./ShadeTongueUp.vue'));
const ShadeTongueDown = defineAsyncComponent(() => import('./ShadeTongueDown.vue'));
const ShadeFace = defineAsyncComponent(() => import('./ShadeFace.vue'));

export interface ConfigProps {
  key: string;
  title: string;
  required?: boolean;
  description?: string;
  example?: string;
  shade?: Component;
  before?: {
    label?: string;
    description?: string;
    example?: string;
  };
  after?: {
    label?: string;
    description?: string;
    example?: string;
  };
}

export default [
  {
    title: '舌面拍摄', key: 'upImg',
    shade: ShadeTongueUp,
    example: getClientURL('~/camera/step-11.example.png'),
    required: true,
    description:
      '请将舌头请确保舌面无食物残渣、没有染色，舌尖向下伸直、 舌体放松、舌面平展、口张大、请避免在有色光线下拍摄。',
    before: { label: '请将舌头放入框内，点击拍照' },
    after: {
      label: '请确认照片',
      example: '',
    },
  },
  {
    title: '舌下拍摄', key: 'downImg',
    shade: ShadeTongueDown,
    example: getClientURL('~/camera/step-21.example.png'),
    required: true,
    description: '舌尖向上抵住上颚、舌体放松、口张大、露出舌下，请避免在有色光线下拍摄。',
    before: { label: '请将舌下放入框内，点击拍照' },
    after: {
      label: '请确认照片',
      example: '',
    },
  },
  {
    title: '面部拍摄', key: 'faceImg',
    shade: ShadeFace,
    example: getClientURL('~/camera/step-31.example.png'),
    required: true,
    description: '请摘下眼镜、平视前方、不要浓妆、不要遮挡面部，请避免在有色光线下拍摄。',
    before: { label: '请将面部放入框内，点击拍照' },
    after: {
      label: '请确认照片',
      example: '',
    },
  },
] as ConfigProps[];
