import {
  createColumnLoader,
  ColumnMetadata,
} from '../DataGrid/configBuilderFactory';

const PROJECTS_COLUMNS: ColumnMetadata[] = [
  { field: 'name', headerName: 'Name', type: 'text', editable: true },
  { field: 'slug', headerName: 'Slug', type: 'text', editable: true },
  {
    field: 'description',
    headerName: 'Description',
    type: 'text',
    editable: true,
  },
  { field: 'logo_url', headerName: 'LogoURL', type: 'text', editable: true },
  {
    field: 'favicon_url',
    headerName: 'FaviconURL',
    type: 'text',
    editable: true,
  },
  {
    field: 'og_image_url',
    headerName: 'OGImageURL',
    type: 'text',
    editable: true,
  },
  {
    field: 'is_deleted',
    headerName: 'Isdeleted',
    type: 'boolean',
    editable: true,
  },
  {
    field: 'deleted_at_time',
    headerName: 'Deletedat',
    type: 'datetime',
    editable: true,
  },
  { field: 'actions', headerName: '', type: 'actions' },
];

export const loadColumns = createColumnLoader({
  entityName: 'projects',
  columns: PROJECTS_COLUMNS,
});
