import { GenericDashboardLocale } from 'components/GenericDashboard';

export interface CorrelationRulesDashboardLocale
  extends GenericDashboardLocale {
  tableMessages: {
    sid: string;
    rev: string;
    name: string;
    status: string;
    group: string;
    created: string;
    updated: string;
    actions: string;
  };

  importConfirmation: string;
  importPopover: string;
  importSuccessTitle: string;
  importSuccessSubtitle: string;
  importFailureTitle: string;
  exportConfirmation: string;
  exportPopover: string;
  exportSuccessTitle: string;
  exportSuccessSubtitle: string;
  exportFailureTitle: string;
}

export interface BaseRuleSettingsMessage {
  title: string;
  ruleName: {
    title: string;
    placeholder: string;
  };
  ruleGroup: {
    title: string;
    placeholder: string;
  };
  depthAnalysis: {
    title: string;
    placeholder: string;
  };
  sid: {
    title: string;
    placeholder: string;
  };
  description: {
    title: string;
    placeholder: string;
  };
  status: {
    title: string;
    placeholder: string;
  };
  multi: {
    title: string;
    placeholder: string;
  };
}

export interface ConditionRuleMessage {
  headerTitle: string;
  title: string;
  checkButton: string;
  selectOptionMessage: {
    [key: string]: string;
  };
  event: {
    created: string;
    id: string;
    severity: string;
    category: string;
    message: string;
    sourceIp: string;
    destinationIp: string;
    combinedIp: string;
    showMore: string;
    showLess: string;
    foundEvents: string;
    total: string;
    ruleHasBeenModified: string;
    noEventsFound: string;
  };
}

export interface ActionRuleMessage {
  title: string;
  add: string;
  check: string;
  unsupported: string;
  mustSelectActions: string;
  deleteConfirm: string;
  deleteOk: string;
  deleteCancel: string;
  deleteAction: string;
  generalSelectMessage: {
    [key: string]: string;
  };
  blockMessages: {
    bashMessage: {
      [key: string]: { [key: string]: string };
    };
    syslogMessage: {
      [key: string]: { [key: string]: string };
    };
    incidentMessage: {
      [key: string]: { [key: string]: string };
    };
    newAssetsMessage: {
      [key: string]: { [key: string]: string };
    };
    runExecutableFileMessage: {
      [key: string]: { [key: string]: string };
    };
    httpMessage: {
      [key: string]: { [key: string]: string };
    };
    fireWallMessage: {
      armaif: {
        title: string;
      };
      enabled: {
        title: string;
        extra: string;
      };
      quick: {
        title: string;
      };
      log: {
        title: string;
        extra: string;
      };
      interface: {
        title: string;
        extra: string;
      };
      direction: {
        title: string;
        extra: string;
      };
      sequence: {
        title: string;
        extra: string;
      };
      action: {
        title: string;
        extra: string;
      };
      ipprotocol: {
        title: string;
      };
      protocol: {
        title: string;
      };
      source_net: {
        title: string;
      };
      source_port: {
        title: string;
      };
      source_not: {
        title: string;
      };
      destination_net: {
        title: string;
      };
      destination_port: {
        title: string;
      };
      destination_not: {
        title: string;
      };
      description: {
        title: string;
        extra: (limit: number) => string;
      };
      other: {
        firewallShouldBeOnline: string;
        firewallIsOnline: string;
        firewallIsOffline: string;
        connectingToTheFirewall: string;
        pleaseSelectFirewall: string;
        firewallConnectionError: string;
      };
    };
  };
}

export type TUseCorrelationRulesAddMessages = {
  title: string;
  enableButton: string;
  disableButton: string;
  save: string;
  formValidationMessages: {
    emptyField: string;
  };
  basicRuleSettingsMessage: BaseRuleSettingsMessage;
  conditionRuleMessage: ConditionRuleMessage;
  actionsRuleMessage: ActionRuleMessage;
};
