// App
// -----------------------------------------------------------------------------
import { CorrelationRulesRecord } from 'types/default';
import { GenericDashboardUiStore } from 'stores/GenericDashboardUiStore';

export class CorrelationRulesUiStore extends GenericDashboardUiStore<CorrelationRulesRecord> {
  constructor() {
    super();
    this.override();
  }

  makeNewElement = (): CorrelationRulesRecord => {
    return {
      // Поля редактируемые в форме
      name: '',
      group: null,
      depth: '00:10:00',
      sid: 0,
      description: '',
      status: false,
      multi: false,
      actions_json: [],
      rule_json: {
        type: 'query_string',
        field: '',
        operands: '',
      },

      // Скрытые поля
      type: 1,

      // Поля НЕ редактируемые в форме
      created: '',
      updated: '',
      archived: false,
      rev: -1,
      id: -1,
      is_active: false,
    };
  };
}
