import { CommonInfoModel } from "@/api/inhert/VillageInfoApi";
import type { SingleForm } from "../forms";
import { villageCommonContent } from "./common";

export const villageInfoEnvironmentForm : SingleForm= [CommonInfoModel, (r) => ({
  formItems: [
    { 
      label: '名称', 
      name: 'name', 
      type: 'text', 
      defaultValue: '',
      additionalProps: {
        placeholder: '请输入名称',
      },
      rules:  [{
        required: true,
        message: '请输入名称',
      }] 
    }, 
    { 
      label: '自然环境', 
      name: 'natural', 
      type: 'richtext', 
      defaultValue: '',
      additionalProps: {
        placeholder: '请输入自然环境',
        maxLength: 200,
        showWordLimit: true, 
      },
      rules:  [{
        required: true,
        message: '请输入自然环境',
      }] 
    }, 
    { 
      label: '选址', 
      name: 'siteSelection', 
      type: 'richtext', 
      defaultValue: '',
      additionalProps: {
        placeholder: '请输入选址',
        maxLength: 200,
        showWordLimit: true, 
      },
      rules:  [{
        required: true,
        message: '请输入选址',
      }] 
    }, 
    { 
      label: '格局', 
      name: 'structure', 
      type: 'richtext', 
      defaultValue: '',
      additionalProps: {
        placeholder: '请输入格局',
        maxLength: 200,
        showWordLimit: true, 
      },
      rules:  [{
        required: true,
        message: '请输入格局',
      }] 
    }, 
    { 
      label: '整体风貌', 
      name: 'overallStyle', 
      type: 'richtext', 
      defaultValue: '',
      additionalProps: {
        placeholder: '请输入整体风貌',
        maxLength: 200,
        showWordLimit: true, 
      },
      rules:  [{
        required: true,
        message: '请输入整体风貌',
      }] 
    }, 
    { 
      label: '农业遗产', 
      name: 'agriculturalHeritage', 
      type: 'richtext', 
      defaultValue: '',
      additionalProps: {
        placeholder: '请输入农业遗产',
        maxLength: 200,
        showWordLimit: true, 
      },
      rules:  [{
        required: true,
        message: '请输入农业遗产',
      }] 
    }, 
    ...villageCommonContent(r, {
      title: '环境格局',
      showContent: false,
      showTitle: false,
    }).formItems
  ] 
}), { title: '环境格局', typeName: '', }]