import { ModelConfig } from "../.types";
import { pageActions, PAGE_SIZE } from "./_common";

export const Event: ModelConfig = 
{ 
  metadata: {
    nameKeys: ["id"],
    pageActions,
  },
  table: {
    toolbar: {
      searchBar: {
        fields: ["id"],
        containsFields: [],
        placeholder: "id",
      },
      actions: [
        {action: 'REFRESH', desc: 'Refresh'},
        {action: 'SETTING', desc: 'Setting'},
        {
          action: "EXPORT",
          desc: 'export',
          fields: ["*","!created_at"]
        },
      ],
    },
    header: {
      filter: [],
      sorter: ["id"],
    },
    fields: ["*","!created_at","!businessRequester","!number","!additionalInfo","!snSysId","!oitOwner","!createdAt","!endDate","!creator","!updatedAt","!startDate","!eventType"],
    rowSelection: {
      actions: [
        {action: 'INSERT', desc: 'Insert'},
        
        {action: 'DELETE', desc: 'Delete'},
        {action: 'EXPORT', desc: 'Export'},
      ],
    },
    rowActions: {
      visibleNum: 2,
      actions: [
        {
          action: "EDIT",
          desc: "Edit",
        },
        
        {action: "DELETE", desc: 'Delete'}
      ],
    },
    params: {
      pageSize: PAGE_SIZE,
    },
  },
  form: {
    fields: ["*","!creator","!created_at","!updated_at","!createdAt","!updatedAt"],
    reaction: {
      id: {
        toggle: [],
        defaultProps: {
          hidden: true,
        },
      },
    },
  },
  show: {
    fields: ["*","!created_at","!businessRequester","!number","!additionalInfo","!snSysId","!oitOwner","!createdAt","!endDate","!creator","!updatedAt","!startDate"],
  },
}
;
