import { FieldMetadataType } from 'src/metadata/field-metadata/field-metadata.entity';

const companyMetadata = {
  nameSingular: 'companyV2',
  namePlural: 'companiesV2',
  labelSingular: 'Company',
  labelPlural: 'Companies',
  targetTableName: 'company',
  description: 'A company',
  icon: 'IconBuildingSkyscraper',
  isActive: true,
  isSystem: false,
  fields: [
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.TEXT,
      name: 'name',
      label: 'Name',
      targetColumnMap: {
        value: 'name',
      },
      description: 'The company name',
      icon: 'IconBuildingSkyscraper',
      isNullable: false,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.TEXT,
      name: 'domainName',
      label: 'Domain Name',
      targetColumnMap: {
        value: 'domainName',
      },
      description:
        'The company website URL. We use this url to fetch the company icon',
      icon: 'IconLink',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.TEXT,
      name: 'address',
      label: 'Address',
      targetColumnMap: {
        value: 'address',
      },
      description: 'The company address',
      icon: 'IconMap',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.NUMBER,
      name: 'employees',
      label: 'Employees',
      targetColumnMap: {
        value: 'employees',
      },
      description: 'Number of employees in the company',
      icon: 'IconUsers',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.TEXT,
      name: 'linkedinUrl',
      label: 'Linkedin',
      targetColumnMap: {
        value: 'linkedinUrl',
      },
      description: 'The company Linkedin account',
      icon: 'IconBrandLinkedin',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.TEXT,
      name: 'xUrl',
      label: 'X',
      targetColumnMap: {
        value: 'xUrl',
      },
      description: 'The company Twitter/X account',
      icon: 'IconBrandX',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.NUMBER,
      name: 'annualRecurringRevenue',
      label: 'ARR',
      targetColumnMap: {
        value: 'annualRecurringRevenue',
      },
      description:
        'Annual Recurring Revenue: The actual or estimated annual revenue of the company',
      icon: 'IconMoneybag',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.BOOLEAN,
      name: 'idealCustomerProfile',
      label: 'ICP',
      targetColumnMap: {
        value: 'idealCustomerProfile',
      },
      description:
        'Ideal Customer Profile:  Indicates whether the company is the most suitable and valuable customer for you',
      icon: 'IconTarget',
      isNullable: true,
    },
    // Relations
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.RELATION,
      name: 'people',
      label: 'People',
      targetColumnMap: {},
      description: 'People linked to the company.',
      icon: 'IconUsers',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.RELATION,
      name: 'accountOwner',
      label: 'Account Owner',
      targetColumnMap: {
        value: 'accountOwnerId',
      },
      description:
        'Your team member responsible for managing the company account',
      icon: 'IconUserCircle',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.RELATION,
      name: 'activityTargets',
      label: 'Activities',
      targetColumnMap: {},
      description: 'Activities tied to the company',
      icon: 'IconCheckbox',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.RELATION,
      name: 'opportunities',
      label: 'Opportunities',
      targetColumnMap: {},
      description: 'Opportunities linked to the company.',
      icon: 'IconTargetArrow',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.RELATION,
      name: 'favorites',
      label: 'Favorites',
      targetColumnMap: {},
      description: 'Favorites linked to the company',
      icon: 'IconHeart',
      isNullable: true,
    },
    {
      isCustom: false,
      isActive: true,
      type: FieldMetadataType.RELATION,
      name: 'attachments',
      label: 'Attachments',
      targetColumnMap: {},
      description: 'Attachments linked to the company.',
      icon: 'IconFileImport',
      isNullable: true,
    },
  ],
};

export default companyMetadata;
