import { MembershipConfig } from '@dvn/core/models/membership-config';
import { dvnSpaces } from './dvn-spaces';
// import { onayAgreements } from './onay-agreements';
export const uyeMembershipConfigs = (config) => ({
  // mentees table
  uyeMembershipConfigs1: MembershipConfig.decode({
    _id: 'uyeMembershipConfigs1',
    _created: new Date(),
    _updated: new Date(),
    agreements: [
    // onayAgreements(config).onayAgreements1.toObject(),
    // onayAgreements(config).onayAgreements3.toObject(),
    ],
    base: 'khanguru',
    enforceRequiredInfo: false,
    fields: [
      {
        type: 'reference',
        id: 'user',
        otherCollection: 'users',
        isSingle: true,
        fields: [
          {
            type: 'text',
            id: 'firstName'
          },
          {
            type: 'text',
            id: 'lastName'
          },
        ]
      },
      {
        id: 'city',
        required: false,
        title: 'City',
        type: 'text',
      },
      {
        id: 'bio',
        lines: 5,
        linesMax: 25,
        title: 'Bio',
        type: 'text',
      },
    ],
    name: 'uyeMembershipsMentees',
    roleName: 'mentee',
    space: dvnSpaces(config).dvnSpaces1,
  }),
  // mentors table
  uyeMembershipConfigs2: MembershipConfig.decode({
    _id: 'uyeMembershipConfigs2',
    _created: new Date(),
    _updated: new Date(),
    agreements: [
    // onayAgreements(config).onayAgreements1.toObject(),
    // onayAgreements(config).onayAgreements2.toObject(),
    ],
    base: 'khanguru',
    fields: [
      {
        type: 'reference',
        id: 'user',
        otherCollection: 'users',
        isSingle: true,
        fields: [
          {
            type: 'text',
            id: 'firstName'
          },
          {
            type: 'text',
            id: 'lastName'
          },
          {
            type: 'text',
            id: 'imageUrl'
          },
        ]
      },
      {
        id: 'city',
        required: true,
        title: 'City',
        type: 'text',
      },
      {
        id: 'company',
        title: 'Company',
        type: 'text',
      },
      {
        id: 'title',
        title: 'Title',
        type: 'text',
      },
      {
        id: 'bio',
        title: 'Bio',
        type: 'text',
      },
    ],
    name: 'uyeMembershipsMentors',
    roleName: 'mentor',
    space: dvnSpaces(config).dvnSpaces1,
  }),
});
