text: import {
    addNodeViewTitleAndText,
    addNodeViewTitleAndTextList,
    customFieldView, externalReferencesView
  } from "../basic.js";
  
  export const MALWARE_ANALYSIS_TYPE = "malware-analysis";
  
  export function getMalwareAnalysisView(titleId, contentId, typeId, malwareAnalysisSDO) {
    document.getElementById(titleId).innerHTML += malwareAnalysisSDO.product;
    document.getElementById(typeId).innerHTML += "Malware Analysis";
  
    let el = document.getElementById(contentId);
    const malwareAnalysisDIV = document.createElement("div");
    malwareAnalysisDIV.id = MALWARE_ANALYSIS_TYPE;
  
    if (malwareAnalysisSDO?.version) addNodeViewTitleAndText(malwareAnalysisDIV, "Version:",
      malwareAnalysisSDO.version);
    if (malwareAnalysisSDO?.configuration_version) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Configuration version:", malwareAnalysisSDO.configuration_version);
    if (malwareAnalysisSDO?.modules) addNodeViewTitleAndTextList(malwareAnalysisDIV, "Modules:",
      malwareAnalysisSDO.modules, "badge-dark");
    if (malwareAnalysisSDO?.analysis_engine_version) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Analysis engine version:", malwareAnalysisSDO.analysis_engine_version);
    if (malwareAnalysisSDO?.analysis_definition_version) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Analysis definition version:", malwareAnalysisSDO.analysis_definition_version);
    if (malwareAnalysisSDO?.submitted) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Submitted:", new Date(malwareAnalysisSDO.submitted).toUTCString());
    if (malwareAnalysisSDO?.analysis_started) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Analysis started:", new Date(malwareAnalysisSDO.analysis_started).toUTCString());
    if (malwareAnalysisSDO?.analysis_ended) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Analysis ended:", new Date(malwareAnalysisSDO.analysis_ended).toUTCString());
    if (malwareAnalysisSDO?.result_name) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Result name:", malwareAnalysisSDO.result_name);
    if (malwareAnalysisSDO?.result) addNodeViewTitleAndText(malwareAnalysisDIV,
      "Result:", malwareAnalysisSDO.result);
  
    el.appendChild(malwareAnalysisDIV);
    customFieldView(malwareAnalysisDIV.id, malwareAnalysisSDO);
    if (malwareAnalysisSDO?.external_references) {
      externalReferencesView(malwareAnalysisDIV.id, malwareAnalysisSDO.external_references);
    }
  }
  