import { reactive } from "vue";
import {type  FormItemOptions } from "@/components";
import {type HardwareData } from "./index.ts";

export const formOptionsUser = reactive<FormItemOptions<HardwareData>>({
  userName:{
    type: "select",
    label: "员工",
    required:true,
    options:[
      {
        value:'张三',
        label:'张三'
      },
      {
        value:'李四',
        label:'李四'
      },
      {
        value:'王五',
        label:'王五'
      },
      {
        value:'赵六',
        label:'赵六'
      },
      {
        value:'刘七',
        label:'刘七'
      },
    ]
  },
  temperature:{
    type:'input',
    label:'体温',
    required:true
  },
  bodyImageUrl:{
    type: "custom",
    label: "衣着图片",
    required:true,
    customRender: (val) => {
      return (
        <div>
          <n-image
            width="200"
            height="150"
            src={val.bodyImageUrl}
          />
        </div>
      );
    }
  },
  handImageUrl:{
    type: "custom",
    label: "手心图片",
    required:true,
    customRender: (val) => {
      return (
        <div>
          <n-image
            width="200"
            height="150"
            src={val.handImageUrl}
          />
        </div>
      );
    }
  },
  handbackImageUrl:{
    type: "custom",
    label: "手背图片",
    required:true,
    customRender: (val) => {
      return (
        <div>
          <n-image
            width="200"
            height="150"
            src={val.handbackImageUrl}
          />
        </div>
      );
    }
  },
  headImageUrl:{
    type: "custom",
    label: "头部图片",
    required:true,
    customRender: (val) => {
      return (
        <div>
          <n-image
            width="200"
            height="150"
            src={val.headImageUrl}
          />
        </div>
      );
    }
  },

})


export  const formOptions1User = reactive<FormItemOptions<HardwareData>>({
  diseases:{
    type:'checkboxGroup',
    label:'健康状态',
    options:[
      {
        value:'无不适',
        label:'无不适'
      },
      {
        value:'发热',
        label:'发热'
      },
      {
        value:'恶心',
        label:'恶心'
      },
      {
        value:'呕吐',
        label:'呕吐'
      },
      {
        value:'咳嗽',
        label:'咳嗽'
      },
      {
        value:'湿疹',
        label:'湿疹'
      },
      {
        value:'腹泻',
        label:'腹泻'
      },
      {
        value:'烫伤',
        label:'烫伤'
      },
    ]
  }
})