import { FieldMetadataType } from 'twenty-shared/types';

import { ObjectMetadataItemWithFieldMaps } from 'src/engine/metadata-modules/types/object-metadata-item-with-field-maps';

export const mockObjectMetadataItemsWithFieldMaps: ObjectMetadataItemWithFieldMaps[] =
  [
    {
      id: '',
      standardId: '',
      nameSingular: 'person',
      namePlural: 'people',
      labelSingular: 'Person',
      labelPlural: 'People',
      description: 'A person',
      icon: 'test-person-icon',
      targetTableName: 'DEPRECATED',
      isCustom: false,
      isRemote: false,
      isActive: true,
      isSystem: false,
      isAuditLogged: true,
      isSearchable: true,
      labelIdentifierFieldMetadataId: 'nameFieldMetadataId',
      imageIdentifierFieldMetadataId: '',
      workspaceId: '',
      fields: [
        {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.FULL_NAME,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: {
            lastName: "''",
            firstName: "''",
          },
          description: 'Contact’s name',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      ],
      indexMetadatas: [],
      fieldsById: {
        nameFieldMetadataId: {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.FULL_NAME,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: {
            lastName: "''",
            firstName: "''",
          },
          description: 'Contact’s name',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      },
      fieldsByName: {
        name: {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.FULL_NAME,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: {
            lastName: "''",
            firstName: "''",
          },
          description: 'Contact’s name',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      },
      fieldsByJoinColumnName: {},
    },
    {
      id: '',
      standardId: '',
      nameSingular: 'company',
      namePlural: 'companies',
      labelSingular: 'Company',
      labelPlural: 'Companies',
      description: 'A company',
      icon: 'test-company-icon',
      targetTableName: 'DEPRECATED',
      isCustom: false,
      isRemote: false,
      isActive: true,
      isSystem: false,
      isAuditLogged: true,
      isSearchable: true,
      labelIdentifierFieldMetadataId: 'nameFieldMetadataId',
      imageIdentifierFieldMetadataId: '',
      workspaceId: '',
      fields: [
        {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
        {
          id: 'domainNameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.LINKS,
          icon: 'test-field-icon',
          name: 'domainName',
          label: 'Domain Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      ],
      indexMetadatas: [],
      fieldsById: {
        nameFieldMetadataId: {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
        domainNameFieldMetadataId: {
          id: 'domainNameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.LINKS,
          icon: 'test-field-icon',
          name: 'domainName',
          label: 'Domain Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      },
      fieldsByName: {
        name: {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: {
            lastName: "''",
            firstName: "''",
          },
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
        domainName: {
          id: 'domainNameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.LINKS,
          icon: 'test-field-icon',
          name: 'domainName',
          label: 'Domain Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      },
      fieldsByJoinColumnName: {},
    },
    {
      id: '',
      standardId: '',
      nameSingular: 'regular-custom-object',
      namePlural: 'regular-custom-objects',
      labelSingular: 'Regular Custom Object',
      labelPlural: 'Regular Custom Objects',
      description: 'A regular custom object',
      icon: 'test-regular-custom-object-icon',
      targetTableName: 'DEPRECATED',
      isCustom: true,
      isRemote: false,
      isActive: true,
      isSystem: false,
      isAuditLogged: true,
      isSearchable: true,
      labelIdentifierFieldMetadataId: 'nameFieldMetadataId',
      imageIdentifierFieldMetadataId: 'imageIdentifierFieldMetadataId',
      workspaceId: '',
      fields: [
        {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
        {
          id: 'imageIdentifierFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'imageIdentifierFieldName',
          label: 'Image Identifier Field Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      ],
      indexMetadatas: [],
      fieldsById: {
        nameFieldMetadataId: {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
        imageIdentifierFieldMetadataId: {
          id: 'imageIdentifierFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'imageIdentifierFieldName',
          label: 'Image Identifier Field Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      },
      fieldsByName: {
        name: {
          id: 'nameFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'name',
          label: 'Name',
          defaultValue: {
            lastName: "''",
            firstName: "''",
          },
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
        imageIdentifierFieldName: {
          id: 'imageIdentifierFieldMetadataId',
          objectMetadataId: '',
          type: FieldMetadataType.TEXT,
          icon: 'test-field-icon',
          name: 'imageIdentifierFieldName',
          label: 'Image Identifier Field Name',
          defaultValue: '',
          isCustom: false,
          isNullable: true,
          isUnique: false,
          workspaceId: '',
        },
      },
      fieldsByJoinColumnName: {},
    },
    {
      id: '',
      standardId: '',
      nameSingular: 'non-searchable-object',
      namePlural: 'non-searchable-objects',
      labelSingular: '',
      labelPlural: '',
      description: '',
      icon: 'test-non-searchable-object-icon',
      targetTableName: 'DEPRECATED',
      isCustom: false,
      isRemote: false,
      isActive: true,
      isSystem: true,
      isAuditLogged: true,
      isSearchable: false,
      labelIdentifierFieldMetadataId: '',
      imageIdentifierFieldMetadataId: '',
      workspaceId: '',
      fields: [],
      indexMetadatas: [],
      fieldsById: {},
      fieldsByName: {},
      fieldsByJoinColumnName: {},
    },
  ];
