import { FieldTypeEnum } from '@lib/shared/enums/formDesignEnum';
import type { SaveBusinessTitleParams } from '@lib/shared/models/contract';

import type { FormCreateField } from '@/components/business/crm-form-create/types';

export const initBusinessTitleForm: SaveBusinessTitleParams = {
  id: '',
  type: 'THIRD_PARTY',
  name: '',
  identificationNumber: '',
  openingBank: '',
  bankAccount: '',
  phoneNumber: '',
  registeredCapital: '',
  companySize: '',
  registrationNumber: '',
  registrationAddress: '',
  province: '', // 省
  city: '', // 市
  remark: '',
  scale: '',
  industry: '',
};

export const businessTitleFieldList: FormCreateField[] = [
  {
    id: 'companyNumber',
    businessKey: 'companyNumber',
    name: 'contract.businessTitle.companyCode',
    type: FieldTypeEnum.SERIAL_NUMBER,
    showLabel: true,
    description: '',
    readable: true,
    editable: false,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'name',
    businessKey: 'name',
    name: 'contract.businessTitle.companyName',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'identificationNumber',
    businessKey: 'identificationNumber',
    name: 'contract.businessTitle.taxpayerNumber',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'registrationAddress',
    businessKey: 'registrationAddress',
    name: 'contract.businessTitle.address',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'openingBank',
    businessKey: 'openingBank',
    name: 'contract.businessTitle.bank',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'bankAccount',
    businessKey: 'bankAccount',
    name: 'contract.businessTitle.bankAccount',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'phoneNumber',
    businessKey: 'phoneNumber',
    name: 'contract.businessTitle.phone',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'registeredCapital',
    businessKey: 'registeredCapital',
    name: 'contract.businessTitle.capital',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'companySize',
    businessKey: 'companySize',
    name: 'contract.businessTitle.companyScale',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
  {
    id: 'registrationNumber',
    businessKey: 'registrationNumber',
    name: 'contract.businessTitle.registrationAccount',
    type: FieldTypeEnum.INPUT,
    showLabel: true,
    description: '',
    readable: true,
    editable: true,
    rules: [],
    icon: '',
    fieldWidth: 1,
  },
];
