import { DetailViewConfig } from '@dvn/core/models/detail-view-config';
import { Comparison } from '@dvn/core/models/filter';
import { AppViewType } from '@dvn/core/models/view-config';
import { dataConfigs } from '../data-configs';
import { spaces } from '../spaces';
export const ID = 'detail-view-user-auth';
export const viewConfig = DetailViewConfig.decode({
  _id: ID,
  base: 'mentornity',
  space: spaces['mentornity'],
  table: dataConfigs['auth'],
  title: 'User Auth',
  ui: {
    cardConfig: {
      body: {
        fields: [
          {
            fieldId: 'createdAt',
          },
          {
            fieldId: 'google',
          },
          {
            fieldId: 'microsoft',
          },
          {
            fieldId: 'zoom',
          },
        ]
      },
    }
  },
  query: {
    filter: {
      comparison: Comparison.Eq,
      id: 'user._id',
      value: '$userId',
    },
  },
  type: AppViewType.DetailView,
  params: {
    userId: {
      required: true,
    },
  },
});
