import { TextField } from '@dvn/core/doldurma/src/fields/text';
import { DetailViewConfig } from '@dvn/core/models/detail-view-config';
import { AppViewType } from '@dvn/core/models/view-config';
import { dataConfigs } from '../data-configs';
import { spaces } from '../spaces';
export const ID = 'detail-view-form-response';
export const viewConfig = DetailViewConfig.decode({
  _id: ID,
  base: 'mentornity',
  space: spaces['mentornity'],
  table: dataConfigs['formResponses'],
  title: 'Form Response',
  ui: {
    cardConfig: {
      body: {
        fields: [
          {
            fieldId: 'createdAt',
          },
          {
            fieldDisplay: new TextField('data.phone', 'Phone'),
          },
          {
            fieldDisplay: new TextField('data.email', 'Email'),
          },
          {
            fieldDisplay: new TextField('data.fullName', 'Name'),
          },
          {
            fieldDisplay: new TextField('data.message', 'Message'),
            lines: 0,
          },
        ]
      },
    }
  },
  type: AppViewType.DetailView,
  params: {
    itemId: {
      required: true,
    },
  },
});
