import { TextField } from '@dvn/core/doldurma/src/fields/text';
import { Comparison } from '@dvn/core/models/filter';
import { DvnDataProvider } from '@dvn/core/providers/DvnDataProvider';
export const userDataProvider = (dataApi) => new DvnDataProvider(dataApi, 'users', {
  fields: [
    new TextField('email', ''),
    new TextField('firstName', ''),
    new TextField('lastName', ''),
    new TextField('status', ''),
  ],
  filter: {
    filters: [
      {
        comparison: Comparison.Eq,
        id: 'status',
        value: 'active',
      },
      {
        comparison: Comparison.Ne,
        id: 'lastName',
        value: '   ',
      },
      {
        comparison: Comparison.Ne,
        id: 'lastName',
        value: '   ',
      },
    ],
    operator: 'and'
  },
  sort: [{ id: 'firstName', order: 1 }]
}, undefined, {
  fields: [
    { fieldId: 'email' },
    { fieldId: 'firstName' },
    { fieldId: 'lastName' },
  ]
});
