All files / src/components/widgets/implementationguide TechnicalDetailsWidget.tsx

82.73% Statements 853/1031
54.31% Branches 107/197
93.33% Functions 14/15
82.73% Lines 853/1031

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 12501x 1x 1x   1x 1x 1x 1x 1x                                                                                   1x 36x 36x 36x 36x 36x 36x   36x   36x     36x       36x   93x 93x 93x     36x 36x 36x 21x 21x 21x 21x 21x   15x 15x 15x 15x 36x   15x 36x             36x     36x 36x 36x 21x 21x   15x 15x 15x 15x 36x   15x 36x       36x     36x 36x 36x 21x 21x   15x 15x 15x 15x 36x   15x 36x       36x     36x 36x 36x 36x 36x 36x 21x 21x   15x 15x 22x 36x 14x 14x   1x 8x       36x     36x 36x 36x 36x 36x 36x 36x 15x 36x                   36x 36x       36x     36x 36x 36x 36x 36x 36x 36x 36x   36x 36x     36x 31x 31x 31x 31x 31x   31x 31x 31x 31x 36x   36x 31x 31x 31x 31x 31x   31x 31x 31x 31x 36x   36x 31x 31x 31x 31x 31x   31x 31x 31x 31x 36x   36x 36x 36x 36x   36x 36x 36x 36x 36x   36x   36x 36x       36x 36x     36x 36x 36x 36x 36x 32x 4x 36x 36x   36x 36x 36x 36x 36x 36x 3x 33x 36x 36x   36x 36x 36x 36x 36x 36x 1x 35x 36x 36x   36x 36x 36x     36x 32x 32x 32x 32x   32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x   32x   32x 32x   32x 32x 32x 32x   32x         32x   32x 32x   32x 32x 32x 32x   32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x   32x 32x   32x 32x 32x 32x   32x 32x 32x 32x 32x 32x 32x     32x 32x 32x 32x 32x   32x 32x 32x 32x   32x 32x 32x 32x 130x 130x 130x   130x 130x 32x 32x 32x 32x   32x   32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x     32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x 32x     32x 32x 32x   32x 32x 32x 32x   32x 32x 32x 32x 97x 97x 97x   97x 97x 97x 32x 32x 32x 32x       36x 3x 3x 3x 3x   3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x   3x   3x 3x   3x 3x 3x 3x   3x   3x   3x 3x   3x 3x 3x 3x   3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x   3x 3x   3x 3x 3x 3x   3x 3x 3x 3x 3x 3x 3x     3x 3x 3x 3x 3x   3x 3x 3x 3x   3x 3x 6x 6x 6x   6x 6x   3x 3x 3x 3x   3x   3x 3x 3x 3x 3x 3x 3x 3x 3x     3x 3x 3x 3x 3x 3x 3x 3x 3x 3x     3x 3x 3x   3x 3x 3x 3x   3x 3x 10x 10x 10x   10x 10x 10x   3x 3x 3x 3x       36x 1x 1x 1x 1x   1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x   1x   1x 1x   1x 1x 1x 1x   1x         1x   1x 1x   1x 1x 1x 1x   1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x   1x 1x   1x 1x 1x 1x   1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x   1x 1x 1x 1x   1x 1x 1x 1x 2x 2x 2x   2x 2x 1x 1x 1x 1x   1x   1x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x   1x 1x 3x 3x 3x   3x 3x 3x   1x 1x 1x 1x       36x 36x 36x 36x 36x 36x 36x 36x     36x 36x 36x 36x 36x     36x 36x 36x 36x 36x     36x 36x 36x 36x 36x     36x 36x 36x 36x 36x 36x   36x     63x 63x 63x 63x 63x 63x 63x 63x 63x 63x     63x 63x 63x 63x 63x 21x 21x   21x   21x 21x 21x   21x   21x   21x 21x   49x 21x 21x   21x   21x 21x 21x   21x   21x   21x 21x     21x 63x   63x   63x 20x 63x   63x   63x 1x 63x 63x     63x 63x 63x 63x 63x 21x 21x   21x   21x 21x 21x   21x   21x   21x 21x   49x 21x 21x   21x   21x 21x 21x   21x   21x   21x 21x     21x 63x   63x   63x 20x 63x   63x   63x 1x 63x 63x     85x 85x 85x 85x 85x 43x 43x   43x             43x 43x 43x 43x 43x 43x 43x 43x 43x               43x               43x   43x 43x   85x 21x 21x   21x           21x 21x 21x 21x 21x 21x 21x 21x 21x               21x               21x   21x 21x     21x 85x   85x           85x 20x 20x 20x 20x 20x 20x 20x 85x               85x               85x 1x 85x 85x     36x 36x 36x 36x 36x 32x 32x 1x 32x   32x 29x 32x 1x 32x 1x 32x   32x 32x   14x 3x 3x   3x   3x 2x 3x   3x 1x 3x   3x 3x     1x 14x   36x   36x 1x 36x   36x   36x   36x 36x     36x 36x 36x 36x 36x 32x 32x 1x 32x   32x 29x 32x 1x 32x 1x 32x   32x 32x   14x 3x 3x   3x   3x 2x 3x   3x 1x 3x   3x 3x     1x 14x   36x   36x 1x 36x   36x   36x   36x 36x     36x 36x 36x 36x 36x 32x 32x 1x 32x   32x 29x 29x 29x 29x 29x 32x 1x 1x 1x 1x 1x 1x 32x 1x 1x 1x 1x 1x 1x 1x 32x   32x 32x   14x 3x 3x   3x   3x 2x 2x 2x 2x 2x 3x             3x 1x 1x 1x 1x 1x 1x 3x   3x 3x     1x 14x   36x   36x 1x 36x             36x               36x   36x 36x   1x  
import React, { useMemo, useState } from "react";
import { WIDGET_ICONS, WIDGET_TITLES } from "../../../constants/appConstants";
import { useCIAContentService } from "../../../hooks/useCIAContentService";
import { SecurityLevel } from "../../../types/cia";
import { getImplementationComplexity } from "../../../utils/riskUtils";
import { getSecurityLevelValue } from "../../../utils/securityLevelUtils";
import { isNullish } from "../../../utils/typeGuards";
import SecurityLevelBadge from "../../common/SecurityLevelBadge";
import WidgetContainer from "../../common/WidgetContainer";
 
/**
 * Props for TechnicalDetailsWidget
 */
interface TechnicalDetailsWidgetProps {
  /**
   * Selected availability level
   */
  availabilityLevel: SecurityLevel;
 
  /**
   * Selected integrity level
   */
  integrityLevel: SecurityLevel;
 
  /**
   * Selected confidentiality level
   */
  confidentialityLevel: SecurityLevel;
 
  /**
   * Optional CSS class name
   */
  className?: string;
 
  /**
   * Optional test ID for testing
   */
  testId?: string;
}
 
/**
 * Widget that displays detailed technical implementation requirements
 *
 * ## Business Perspective
 *
 * This widget provides technical teams with specific implementation details
 * for achieving the selected security levels. It helps bridge the gap between
 * security requirements and technical implementation by providing concrete
 * guidance on controls, configurations, and technologies. 🛠️
 */
const TechnicalDetailsWidget: React.FC<TechnicalDetailsWidgetProps> = ({
  availabilityLevel,
  integrityLevel,
  confidentialityLevel,
  className = "",
  testId = "technical-details-widget",
}) => {
  // State for active tab
  const [activeTab, setActiveTab] = useState<
    "confidentiality" | "integrity" | "availability"
  >("confidentiality");
 
  // Get CIA content service
  const { ciaContentService, error, isLoading } = useCIAContentService();
 
  // Helper to convert complexity string to numeric value for UI
  // Simplified using existing utility
  const getComplexityValue = (complexity: string): number => {
    // Convert security level value (0-4) to percentage (0-100)
    const value = getSecurityLevelValue(complexity as SecurityLevel);
    return value * 25;
  };
 
  // Get technical details for each component with error handling
  const confidentialityDetails = useMemo(() => {
    try {
      if (isNullish(ciaContentService)) {
        return getDefaultTechnicalDetails(
          "confidentiality",
          confidentialityLevel
        );
      }
 
      const details = ciaContentService.getComponentDetails?.(
        "confidentiality",
        confidentialityLevel
      );
      return isNullish(details)
        ? getDefaultTechnicalDetails("confidentiality", confidentialityLevel)
        : details;
    } catch (err) {
      console.error("Error getting confidentiality details:", err);
      return getDefaultTechnicalDetails(
        "confidentiality",
        confidentialityLevel
      );
    }
  }, [ciaContentService, confidentialityLevel]);
 
  // Get integrity technical details
  const integrityDetails = useMemo(() => {
    try {
      if (isNullish(ciaContentService)) {
        return getDefaultTechnicalDetails("integrity", integrityLevel);
      }
 
      const details = ciaContentService.getComponentDetails?.(
        "integrity",
        integrityLevel
      );
      return isNullish(details)
        ? getDefaultTechnicalDetails("integrity", integrityLevel)
        : details;
    } catch (err) {
      console.error("Error getting integrity details:", err);
      return getDefaultTechnicalDetails("integrity", integrityLevel);
    }
  }, [ciaContentService, integrityLevel]);
 
  // Get availability technical details
  const availabilityDetails = useMemo(() => {
    try {
      if (isNullish(ciaContentService)) {
        return getDefaultTechnicalDetails("availability", availabilityLevel);
      }
 
      const details = ciaContentService.getComponentDetails?.(
        "availability",
        availabilityLevel
      );
      return isNullish(details)
        ? getDefaultTechnicalDetails("availability", availabilityLevel)
        : details;
    } catch (err) {
      console.error("Error getting availability details:", err);
      return getDefaultTechnicalDetails("availability", availabilityLevel);
    }
  }, [ciaContentService, availabilityLevel]);
 
  // Get technical requirements for a specific component and level
  const getTechnicalRequirements = (
    component: string,
    level: SecurityLevel
  ): string[] => {
    try {
      if (isNullish(ciaContentService)) {
        return getDefaultRequirements(component, level);
      }
 
      const requirements = (
        ciaContentService as any
      ).getTechnicalRequirements?.(component, level);
      if (Array.isArray(requirements) && requirements.length > 0) {
        return requirements;
      }
 
      return getDefaultRequirements(component, level);
    } catch (err) {
      console.error(`Error getting ${component} requirements:`, err);
      return getDefaultRequirements(component, level);
    }
  };
 
  // Get expertise required for implementation
  const getExpertiseRequired = (
    component: string,
    level: SecurityLevel
  ): string[] => {
    try {
      if (
        !isNullish(ciaContentService) &&
        typeof (ciaContentService as any).getExpertiseRequired === "function"
      ) {
        const expertise = (ciaContentService as any).getExpertiseRequired(
          component,
          level
        );
        if (Array.isArray(expertise) && expertise.length > 0) {
          return expertise;
        }
      }
 
      return getDefaultExpertise(component, level);
    } catch (err) {
      console.error(`Error getting ${component} expertise requirements:`, err);
      return getDefaultExpertise(component, level);
    }
  };
 
  // Get personnel requirements
  const getPersonnelRequirements = (level: SecurityLevel): string => {
    const levelValues: Record<SecurityLevel, number> = {
      None: 0.1,
      Low: 0.25,
      Moderate: 0.5,
      High: 1,
      "Very High": 2,
    };
 
    return `${levelValues[level] || 0.5} FTE`;
  };
 
  // Calculate component complexities using riskUtils
  const confidentialityComplexity = useMemo(() => {
    const complexity = getImplementationComplexity(
      confidentialityLevel,
      confidentialityLevel,
      confidentialityLevel
    );
 
    return {
      value: getComplexityValue(complexity),
      label: complexity,
    };
  }, [confidentialityLevel]);
 
  const integrityComplexity = useMemo(() => {
    const complexity = getImplementationComplexity(
      integrityLevel,
      integrityLevel,
      integrityLevel
    );
 
    return {
      value: getComplexityValue(complexity),
      label: complexity,
    };
  }, [integrityLevel]);
 
  const availabilityComplexity = useMemo(() => {
    const complexity = getImplementationComplexity(
      availabilityLevel,
      availabilityLevel,
      availabilityLevel
    );
 
    return {
      value: getComplexityValue(complexity),
      label: complexity,
    };
  }, [availabilityLevel]);
 
  return (
    <WidgetContainer
      title={
        WIDGET_TITLES.TECHNICAL_DETAILS || "Technical Implementation Details"
      }
      icon={WIDGET_ICONS.TECHNICAL_DETAILS || "🛠️"}
      className={className}
      testId={testId}
      isLoading={isLoading}
      error={error}
    >
      <div className="p-4">
        {/* Technical details description */}
        <div className="mb-4 p-3 bg-blue-50 dark:bg-blue-900 dark:bg-opacity-20 rounded-lg">
          <p className="text-sm">
            This widget provides technical implementation details for achieving
            your selected security levels. Use these guidelines when designing
            and implementing your security controls.
          </p>
        </div>
 
        {/* Tab Navigation */}
        <div className="flex border-b border-gray-200 dark:border-gray-700 mb-4">
          <button
            onClick={() => setActiveTab("confidentiality")}
            className={`py-2 px-4 font-medium text-sm focus:outline-none ${
              activeTab === "confidentiality"
                ? "border-b-2 border-purple-500 text-purple-600 dark:text-purple-400"
                : "text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"
            }`}
            data-testid="confidentiality-tab"
          >
            <span className="mr-1">🔒</span> Confidentiality
          </button>
          <button
            onClick={() => setActiveTab("integrity")}
            className={`py-2 px-4 font-medium text-sm focus:outline-none ${
              activeTab === "integrity"
                ? "border-b-2 border-green-500 text-green-600 dark:text-green-400"
                : "text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"
            }`}
            data-testid="integrity-tab"
          >
            <span className="mr-1">✓</span> Integrity
          </button>
          <button
            onClick={() => setActiveTab("availability")}
            className={`py-2 px-4 font-medium text-sm focus:outline-none ${
              activeTab === "availability"
                ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400"
                : "text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"
            }`}
            data-testid="availability-tab"
          >
            <span className="mr-1">⏱️</span> Availability
          </button>
        </div>
 
        {/* Confidentiality details */}
        {activeTab === "confidentiality" && (
          <div className="mb-6" data-testid="confidentiality-section">
            <div
              className="flex items-center mb-4"
              data-testid="technical-header"
            >
              <span className="text-xl mr-2 text-purple-500">🔒</span>
              <h3 className="text-lg font-medium">Confidentiality Controls</h3>
              <div className="ml-auto">
                <SecurityLevelBadge
                  category=""
                  level={confidentialityLevel}
                  colorClass="bg-purple-100 dark:bg-purple-900 dark:bg-opacity-20"
                  textClass="text-purple-800 dark:text-purple-300"
                  testId={`${testId}-confidentiality-badge`}
                />
              </div>
            </div>
 
            <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
              {/* Main technical details card */}
              <div className="p-4 bg-purple-50 dark:bg-purple-900 dark:bg-opacity-20 rounded-lg shadow-sm border border-purple-100 dark:border-purple-800">
                <h4 className="text-md font-medium text-purple-700 dark:text-purple-300 mb-3">
                  Technical Description
                </h4>
                <p
                  className="text-sm text-gray-600 dark:text-gray-400"
                  data-testid="technical-description"
                >
                  {confidentialityDetails?.technical ||
                    getDefaultTechDescription(
                      "confidentiality",
                      confidentialityLevel
                    )}
                </p>
 
                <div className="mt-4">
                  <h5 className="text-sm font-medium text-purple-700 dark:text-purple-300 mb-2">
                    Implementation Complexity
                  </h5>
                  <div
                    className="flex items-center"
                    data-testid="development-effort"
                  >
                    <div className="flex-1 h-2 bg-gray-200 dark:bg-gray-700 rounded-full mr-2">
                      <div
                        className="h-2 bg-purple-500 dark:bg-purple-600 rounded-full"
                        style={{ width: `${confidentialityComplexity.value}%` }}
                      ></div>
                    </div>
                    <span className="text-xs font-medium">
                      {confidentialityComplexity.label}
                    </span>
                  </div>
                </div>
 
                <div className="mt-4">
                  <h5 className="text-sm font-medium text-purple-700 dark:text-purple-300 mb-2">
                    Personnel Requirements
                  </h5>
                  <div
                    className="flex items-center"
                    data-testid="maintenance-level"
                  >
                    <span className="text-sm">Estimated staffing: </span>
                    <span className="ml-2 text-sm font-medium text-purple-600 dark:text-purple-400">
                      {getPersonnelRequirements(confidentialityLevel)}
                    </span>
                  </div>
                </div>
              </div>
 
              {/* Implementation requirements card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4
                  className="text-md font-medium mb-3"
                  data-testid="implementation-header"
                >
                  Implementation Requirements
                </h4>
                <ul
                  className="list-disc list-inside space-y-2 text-sm text-gray-600 dark:text-gray-400"
                  data-testid="implementation-steps"
                >
                  {getTechnicalRequirements(
                    "confidentiality",
                    confidentialityLevel
                  ).map((req, index) => (
                    <li
                      key={`conf-req-${index}`}
                      data-testid={`conf-req-${index}`}
                    >
                      {req}
                    </li>
                  ))}
                </ul>
              </div>
            </div>
 
            <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
              {/* Technologies card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4 className="text-md font-medium flex items-center mb-3">
                  <span className="mr-2 text-purple-500">💻</span>Technologies
                </h4>
                <p className="text-sm text-purple-600 dark:text-purple-400">
                  {(confidentialityDetails as any)?.technologies ||
                    getDefaultTechnologies(
                      "confidentiality",
                      confidentialityLevel
                    )}
                </p>
              </div>
 
              {/* Configurations card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4 className="text-md font-medium flex items-center mb-3">
                  <span className="mr-2 text-purple-500">⚙️</span>Configurations
                </h4>
                <p className="text-sm text-purple-600 dark:text-purple-400">
                  {(confidentialityDetails as any)?.configurations ||
                    getDefaultConfigurations(
                      "confidentiality",
                      confidentialityLevel
                    )}
                </p>
              </div>
            </div>
 
            {/* Expertise Required card */}
            <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 mb-4">
              <h4 className="text-md font-medium flex items-center mb-3">
                <span className="mr-2 text-purple-500">👨‍💻</span>Expertise
                Required
              </h4>
              <ul
                className="grid grid-cols-1 md:grid-cols-2 gap-2"
                data-testid="required-expertise"
              >
                {getExpertiseRequired(
                  "confidentiality",
                  confidentialityLevel
                ).map((expertise, index) => (
                  <li
                    key={`conf-exp-${index}`}
                    className="flex items-center text-sm"
                  >
                    <span className="mr-2 text-purple-500">•</span>
                    <span>{expertise}</span>
                  </li>
                ))}
              </ul>
            </div>
          </div>
        )}
 
        {/* Integrity details */}
        {activeTab === "integrity" && (
          <div className="mb-6" data-testid="integrity-section">
            <div
              className="flex items-center mb-4"
              data-testid="technical-header"
            >
              <span className="text-xl mr-2 text-green-500">✓</span>
              <h3 className="text-lg font-medium">Integrity Controls</h3>
              <div className="ml-auto">
                <SecurityLevelBadge
                  category=""
                  level={integrityLevel}
                  colorClass="bg-green-100 dark:bg-green-900 dark:bg-opacity-20"
                  textClass="text-green-800 dark:text-green-300"
                  testId={`${testId}-integrity-badge`}
                />
              </div>
            </div>
 
            <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
              {/* Main technical details card */}
              <div className="p-4 bg-green-50 dark:bg-green-900 dark:bg-opacity-20 rounded-lg shadow-sm border border-green-100 dark:border-green-800">
                <h4 className="text-md font-medium text-green-700 dark:text-green-300 mb-3">
                  Technical Description
                </h4>
                <p
                  className="text-sm text-gray-600 dark:text-gray-400"
                  data-testid="technical-description"
                >
                  {integrityDetails?.technical ||
                    getDefaultTechDescription("integrity", integrityLevel)}
                </p>
 
                <div className="mt-4">
                  <h5 className="text-sm font-medium text-green-700 dark:text-green-300 mb-2">
                    Implementation Complexity
                  </h5>
                  <div
                    className="flex items-center"
                    data-testid="development-effort"
                  >
                    <div className="flex-1 h-2 bg-gray-200 dark:bg-gray-700 rounded-full mr-2">
                      <div
                        className="h-2 bg-green-500 dark:bg-green-600 rounded-full"
                        style={{ width: `${integrityComplexity.value}%` }}
                      ></div>
                    </div>
                    <span className="text-xs font-medium">
                      {integrityComplexity.label}
                    </span>
                  </div>
                </div>
 
                <div className="mt-4">
                  <h5 className="text-sm font-medium text-green-700 dark:text-green-300 mb-2">
                    Personnel Requirements
                  </h5>
                  <div
                    className="flex items-center"
                    data-testid="maintenance-level"
                  >
                    <span className="text-sm">Estimated staffing: </span>
                    <span className="ml-2 text-sm font-medium text-green-600 dark:text-green-400">
                      {getPersonnelRequirements(integrityLevel)}
                    </span>
                  </div>
                </div>
              </div>
 
              {/* Implementation requirements card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4
                  className="text-md font-medium mb-3"
                  data-testid="implementation-header"
                >
                  Implementation Requirements
                </h4>
                <ul
                  className="list-disc list-inside space-y-2 text-sm text-gray-600 dark:text-gray-400"
                  data-testid="implementation-steps"
                >
                  {getTechnicalRequirements("integrity", integrityLevel).map(
                    (req, index) => (
                      <li
                        key={`int-req-${index}`}
                        data-testid={`int-req-${index}`}
                      >
                        {req}
                      </li>
                    )
                  )}
                </ul>
              </div>
            </div>
 
            <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
              {/* Technologies card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4 className="text-md font-medium flex items-center mb-3">
                  <span className="mr-2 text-green-500">💻</span>Technologies
                </h4>
                <p className="text-sm text-green-600 dark:text-green-400">
                  {(integrityDetails as any)?.technologies ||
                    getDefaultTechnologies("integrity", integrityLevel)}
                </p>
              </div>
 
              {/* Configurations card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4 className="text-md font-medium flex items-center mb-3">
                  <span className="mr-2 text-green-500">⚙️</span>Configurations
                </h4>
                <p className="text-sm text-green-600 dark:text-green-400">
                  {(integrityDetails as any)?.configurations ||
                    getDefaultConfigurations("integrity", integrityLevel)}
                </p>
              </div>
            </div>
 
            {/* Expertise Required card */}
            <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 mb-4">
              <h4 className="text-md font-medium flex items-center mb-3">
                <span className="mr-2 text-green-500">👨‍💻</span>Expertise
                Required
              </h4>
              <ul
                className="grid grid-cols-1 md:grid-cols-2 gap-2"
                data-testid="required-expertise"
              >
                {getExpertiseRequired("integrity", integrityLevel).map(
                  (expertise, index) => (
                    <li
                      key={`int-exp-${index}`}
                      className="flex items-center text-sm"
                    >
                      <span className="mr-2 text-green-500">•</span>
                      <span>{expertise}</span>
                    </li>
                  )
                )}
              </ul>
            </div>
          </div>
        )}
 
        {/* Availability details */}
        {activeTab === "availability" && (
          <div className="mb-6" data-testid="availability-section">
            <div
              className="flex items-center mb-4"
              data-testid="technical-header"
            >
              <span className="text-xl mr-2 text-blue-500">⏱️</span>
              <h3 className="text-lg font-medium">Availability Controls</h3>
              <div className="ml-auto">
                <SecurityLevelBadge
                  category=""
                  level={availabilityLevel}
                  colorClass="bg-blue-100 dark:bg-blue-900 dark:bg-opacity-20"
                  textClass="text-blue-800 dark:text-blue-300"
                  testId={`${testId}-availability-badge`}
                />
              </div>
            </div>
 
            <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
              {/* Main technical details card */}
              <div className="p-4 bg-blue-50 dark:bg-blue-900 dark:bg-opacity-20 rounded-lg shadow-sm border border-blue-100 dark:border-blue-800">
                <h4 className="text-md font-medium text-blue-700 dark:text-blue-300 mb-3">
                  Technical Description
                </h4>
                <p
                  className="text-sm text-gray-600 dark:text-gray-400"
                  data-testid="technical-description"
                >
                  {availabilityDetails?.technical ||
                    getDefaultTechDescription(
                      "availability",
                      availabilityLevel
                    )}
                </p>
 
                <div className="mt-4">
                  <h5 className="text-sm font-medium text-blue-700 dark:text-blue-300 mb-2">
                    Implementation Complexity
                  </h5>
                  <div
                    className="flex items-center"
                    data-testid="development-effort"
                  >
                    <div className="flex-1 h-2 bg-gray-200 dark:bg-gray-700 rounded-full mr-2">
                      <div
                        className="h-2 bg-blue-500 dark:bg-blue-600 rounded-full"
                        style={{ width: `${availabilityComplexity.value}%` }}
                      ></div>
                    </div>
                    <span className="text-xs font-medium">
                      {availabilityComplexity.label}
                    </span>
                  </div>
                </div>
 
                <div className="mt-4">
                  <h5 className="text-sm font-medium text-blue-700 dark:text-blue-300 mb-2">
                    Personnel Requirements
                  </h5>
                  <div
                    className="flex items-center"
                    data-testid="maintenance-level"
                  >
                    <span className="text-sm">Estimated staffing: </span>
                    <span className="ml-2 text-sm font-medium text-blue-600 dark:text-blue-400">
                      {getPersonnelRequirements(availabilityLevel)}
                    </span>
                  </div>
                </div>
              </div>
 
              {/* Implementation requirements card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4
                  className="text-md font-medium mb-3"
                  data-testid="implementation-header"
                >
                  Implementation Requirements
                </h4>
                <ul
                  className="list-disc list-inside space-y-2 text-sm text-gray-600 dark:text-gray-400"
                  data-testid="implementation-steps"
                >
                  {getTechnicalRequirements(
                    "availability",
                    availabilityLevel
                  ).map((req, index) => (
                    <li
                      key={`avail-req-${index}`}
                      data-testid={`avail-req-${index}`}
                    >
                      {req}
                    </li>
                  ))}
                </ul>
              </div>
            </div>
 
            <div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
              {/* Technologies card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4 className="text-md font-medium flex items-center mb-3">
                  <span className="mr-2 text-blue-500">💻</span>Technologies
                </h4>
                <p className="text-sm text-blue-600 dark:text-blue-400">
                  {(availabilityDetails as any)?.technologies ||
                    getDefaultTechnologies("availability", availabilityLevel)}
                </p>
              </div>
 
              {/* Configurations card */}
              <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
                <h4 className="text-md font-medium flex items-center mb-3">
                  <span className="mr-2 text-blue-500">⚙️</span>Configurations
                </h4>
                <p className="text-sm text-blue-600 dark:text-blue-400">
                  {(availabilityDetails as any)?.configurations ||
                    getDefaultConfigurations("availability", availabilityLevel)}
                </p>
              </div>
            </div>
 
            {/* Expertise Required card */}
            <div className="p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 mb-4">
              <h4 className="text-md font-medium flex items-center mb-3">
                <span className="mr-2 text-blue-500">👨‍💻</span>Expertise Required
              </h4>
              <ul
                className="grid grid-cols-1 md:grid-cols-2 gap-2"
                data-testid="required-expertise"
              >
                {getExpertiseRequired("availability", availabilityLevel).map(
                  (expertise, index) => (
                    <li
                      key={`avail-exp-${index}`}
                      className="flex items-center text-sm"
                    >
                      <span className="mr-2 text-blue-500">•</span>
                      <span>{expertise}</span>
                    </li>
                  )
                )}
              </ul>
            </div>
          </div>
        )}
 
        {/* Implementation considerations */}
        <div className="p-4 bg-gray-50 dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
          <h3 className="text-lg font-medium mb-3 flex items-center">
            <span className="mr-2">💡</span>Implementation Notes
          </h3>
          <ul className="space-y-2 text-sm text-gray-600 dark:text-gray-400">
            <li className="flex items-start">
              <span className="mr-2 text-blue-500">•</span>
              <span>
                Implement these technical controls in a layered approach,
                starting with foundational controls.
              </span>
            </li>
            <li className="flex items-start">
              <span className="mr-2 text-blue-500">•</span>
              <span>
                Regular testing and validation are required to ensure controls
                are functioning as intended.
              </span>
            </li>
            <li className="flex items-start">
              <span className="mr-2 text-blue-500">•</span>
              <span>
                Consider integrating with existing security infrastructure to
                maximize effectiveness.
              </span>
            </li>
            <li className="flex items-start">
              <span className="mr-2 text-blue-500">•</span>
              <span>
                Document all implementation details and maintain up-to-date
                configuration records.
              </span>
            </li>
          </ul>
        </div>
      </div>
    </WidgetContainer>
  );
};
 
// Helper function to get default technical details when service isn't available
function getDefaultTechnicalDetails(
  component: string,
  level: SecurityLevel
): any {
  return {
    description: getDefaultDescription(component, level),
    technical: getDefaultTechDescription(component, level),
    recommendations: getDefaultRequirements(component, level),
  };
}
 
// Default description based on component and security level
function getDefaultDescription(
  component: string,
  level: SecurityLevel
): string {
  if (component === "confidentiality") {
    switch (level) {
      case "None":
        return "No confidentiality controls implemented, allowing unrestricted access to data.";
      case "Low":
        return "Basic confidentiality controls to prevent casual unauthorized access to data.";
      case "Moderate":
        return "Standard confidentiality controls with defined access privileges and protections.";
      case "High":
        return "Advanced confidentiality controls with strong encryption and strict access management.";
      case "Very High":
        return "Comprehensive confidentiality controls with the highest level of protection.";
      default:
        return "Standard confidentiality controls.";
    }
  }
 
  if (component === "integrity") {
    switch (level) {
      case "None":
        return "No integrity controls implemented, data can be modified without detection.";
      case "Low":
        return "Basic integrity controls that provide minimal protection against unauthorized changes.";
      case "Moderate":
        return "Standard integrity controls that detect unauthorized modifications to data.";
      case "High":
        return "Advanced integrity controls with cryptographic verification of data.";
      case "Very High":
        return "Comprehensive integrity controls with immutable audit trails.";
      default:
        return "Standard integrity controls.";
    }
  }
 
  // Default to availability
  switch (level) {
    case "None":
      return "No availability controls implemented, no guarantees for system uptime.";
    case "Low":
      return "Basic availability controls providing minimal resilience to disruptions.";
    case "Moderate":
      return "Standard availability controls ensuring reasonable system uptime.";
    case "High":
      return "Advanced availability controls with redundancy and quick recovery capabilities.";
    case "Very High":
      return "Comprehensive availability controls with maximum fault tolerance.";
    default:
      return "Standard availability controls.";
  }
}
 
// Default technical description based on component and security level
function getDefaultTechDescription(
  component: string,
  level: SecurityLevel
): string {
  if (component === "confidentiality") {
    switch (level) {
      case "None":
        return "No specific technical controls for protecting data confidentiality.";
      case "Low":
        return "Basic access controls and password protection for sensitive resources.";
      case "Moderate":
        return "Role-based access control (RBAC), data encryption at rest and in transit, and proper authentication mechanisms.";
      case "High":
        return "Granular access control, strong encryption with proper key management, DLP controls, and multi-factor authentication.";
      case "Very High":
        return "Zero-trust architecture, advanced encryption with hardware security modules, comprehensive DLP, and context-aware access controls.";
      default:
        return "Standard confidentiality technical controls.";
    }
  }
 
  if (component === "integrity") {
    switch (level) {
      case "None":
        return "No specific technical controls for ensuring data integrity.";
      case "Low":
        return "Basic input validation and error detection mechanisms.";
      case "Moderate":
        return "Comprehensive input validation, checksums, access controls, and error detection.";
      case "High":
        return "Digital signatures, cryptographic hashing, strong change control, and comprehensive logging.";
      case "Very High":
        return "Blockchain or similar technologies for critical data, immutable audit logs, and formal verification methods.";
      default:
        return "Standard integrity technical controls.";
    }
  }
 
  // Default to availability
  switch (level) {
    case "None":
      return "No specific technical controls for ensuring system availability.";
    case "Low":
      return "Basic monitoring and manual recovery procedures.";
    case "Moderate":
      return "Redundant components, scheduled backups, load balancing, and defined recovery procedures.";
    case "High":
      return "Automatic failover, real-time monitoring, comprehensive disaster recovery, and advanced load balancing.";
    case "Very High":
      return "Multi-site active-active configurations, continuous data protection, and fully automated recovery with zero data loss.";
    default:
      return "Standard availability technical controls.";
  }
}
 
// Default technical requirements based on component and security level
function getDefaultRequirements(
  component: string,
  level: SecurityLevel
): string[] {
  if (component === "confidentiality") {
    switch (level) {
      case "None":
        return ["No specific requirements."];
      case "Low":
        return [
          "Implement user authentication",
          "Use basic password policies",
          "Apply simple access controls",
          "Secure sensitive data storage",
        ];
      case "Moderate":
        return [
          "Implement role-based access control",
          "Use standard TLS for data in transit",
          "Encrypt sensitive data at rest",
          "Enforce strong password policies",
          "Implement session management",
        ];
      case "High":
        return [
          "Implement multi-factor authentication",
          "Deploy data loss prevention solutions",
          "Use strong encryption for all data",
          "Implement privileged access management",
          "Conduct regular access reviews",
        ];
      case "Very High":
        return [
          "Implement zero-trust network architecture",
          "Use hardware security modules for encryption",
          "Deploy advanced data loss prevention",
          "Implement just-in-time access",
          "Use behavioral analytics for access monitoring",
        ];
      default:
        return ["Standard confidentiality requirements."];
    }
  }
 
  if (component === "integrity") {
    switch (level) {
      case "None":
        return ["No specific requirements."];
      case "Low":
        return [
          "Implement basic input validation",
          "Use simple error detection",
          "Apply basic data quality checks",
        ];
      case "Moderate":
        return [
          "Implement comprehensive input validation",
          "Use checksums for data verification",
          "Implement change detection mechanisms",
          "Maintain data validation logs",
          "Use database constraints",
        ];
      case "High":
        return [
          "Implement digital signatures",
          "Use cryptographic hash verification",
          "Deploy comprehensive audit logging",
          "Implement strict change controls",
          "Use data integrity monitoring",
        ];
      case "Very High":
        return [
          "Implement blockchain for critical data",
          "Use immutable audit trails",
          "Deploy formal verification methods",
          "Implement hardware-based integrity controls",
          "Use zero-knowledge proofs where applicable",
        ];
      default:
        return ["Standard integrity requirements."];
    }
  }
 
  // Default to availability
  switch (level) {
    case "None":
      return ["No specific requirements."];
    case "Low":
      return [
        "Set up basic system monitoring",
        "Implement manual backup procedures",
        "Create simple incident response plan",
      ];
    case "Moderate":
      return [
        "Implement redundant components",
        "Set up scheduled backup routines",
        "Deploy basic load balancing",
        "Create disaster recovery procedures",
        "Implement health checks and alerts",
      ];
    case "High":
      return [
        "Implement automatic failover mechanisms",
        "Deploy real-time monitoring and alerting",
        "Set up geographically distributed backups",
        "Implement advanced load balancing",
        "Create comprehensive disaster recovery plan",
      ];
    case "Very High":
      return [
        "Implement multi-site active-active configuration",
        "Deploy continuous data protection",
        "Use fully automated recovery mechanisms",
        "Implement zero-downtime deployment processes",
        "Deploy dedicated site reliability engineering",
      ];
    default:
      return ["Standard availability requirements."];
  }
}
 
// Default technologies based on component and security level
function getDefaultTechnologies(
  component: string,
  level: SecurityLevel
): string {
  if (component === "confidentiality") {
    switch (level) {
      case "None":
        return "No specific technologies";
      case "Low":
        return "Password managers, basic access control lists";
      case "Moderate":
        return "LDAP, Active Directory, TLS 1.2+, AES-128";
      case "High":
        return "MFA solutions, DLP tools, AES-256, Key Management Systems";
      case "Very High":
        return "Zero-trust platforms, HSMs, Advanced SIEM/SOAR, PAM solutions";
      default:
        return "Standard security technologies";
    }
  }
 
  if (component === "integrity") {
    switch (level) {
      case "None":
        return "No specific technologies";
      case "Low":
        return "Form validation libraries, database constraints";
      case "Moderate":
        return "Checksum tools, hash functions (SHA-256), validation frameworks";
      case "High":
        return "Digital signature tools, cryptographic libraries, audit platforms";
      case "Very High":
        return "Blockchain frameworks, zero-knowledge proof systems, formal verification tools";
      default:
        return "Standard integrity technologies";
    }
  }
 
  // Default to availability
  switch (level) {
    case "None":
      return "No specific technologies";
    case "Low":
      return "Basic monitoring tools, manual backup solutions";
    case "Moderate":
      return "Load balancers, backup solutions, monitoring systems";
    case "High":
      return "Clustering solutions, automated failover systems, advanced monitoring";
    case "Very High":
      return "Global load balancing, containerization, automated recovery systems";
    default:
      return "Standard availability technologies";
  }
}
 
// Default configurations based on component and security level
function getDefaultConfigurations(
  component: string,
  level: SecurityLevel
): string {
  if (component === "confidentiality") {
    switch (level) {
      case "None":
        return "No specific configurations";
      case "Low":
        return "Basic password policies, minimal HTTPS";
      case "Moderate":
        return "RBAC configurations, TLS 1.2+, standard encryption setup";
      case "High":
        return "MFA policies, DLP rules, key management procedures";
      case "Very High":
        return "Zero-trust policies, HSM integration, advanced access controls";
      default:
        return "Standard security configurations";
    }
  }
 
  if (component === "integrity") {
    switch (level) {
      case "None":
        return "No specific configurations";
      case "Low":
        return "Basic validation rules, simple error handling";
      case "Moderate":
        return "Comprehensive validation rules, hash verification setup";
      case "High":
        return "Digital signature verification, advanced audit logging, strong change control";
      case "Very High":
        return "Blockchain node configuration, immutable storage settings";
      default:
        return "Standard integrity configurations";
    }
  }
 
  // Default to availability
  switch (level) {
    case "None":
      return "No specific configurations";
    case "Low":
      return "Basic monitoring alerts, manual backup procedures";
    case "Moderate":
      return "Redundant configurations, backup schedules, load balancer settings";
    case "High":
      return "Cluster configurations, automated failover settings, monitoring rules";
    case "Very High":
      return "Multi-region deployments, automated scaling, zero-downtime configurations";
    default:
      return "Standard availability configurations";
  }
}
 
// Add function to return default expertise requirements
function getDefaultExpertise(
  component: string,
  level: SecurityLevel
): string[] {
  if (component === "confidentiality") {
    switch (level) {
      case "None":
        return ["No specific expertise required"];
      case "Low":
        return ["Basic security knowledge", "Access control fundamentals"];
      case "Moderate":
        return [
          "Identity management",
          "Encryption technologies",
          "Authentication systems",
        ];
      case "High":
        return [
          "Advanced cryptography",
          "Identity and access management",
          "Security architecture",
          "Data protection",
        ];
      case "Very High":
        return [
          "Security architecture",
          "Advanced cryptography",
          "Zero-trust implementation",
          "Data protection specialization",
          "Hardware security",
        ];
      default:
        return ["General security knowledge"];
    }
  }
 
  if (component === "integrity") {
    switch (level) {
      case "None":
        return ["No specific expertise required"];
      case "Low":
        return ["Basic data validation", "Error handling"];
      case "Moderate":
        return [
          "Data validation techniques",
          "Database integrity",
          "Error handling",
        ];
      case "High":
        return [
          "Cryptographic verification",
          "Digital signatures",
          "Secure logging",
          "Change management",
        ];
      case "Very High":
        return [
          "Advanced cryptography",
          "Formal verification",
          "Distributed ledger technologies",
          "Immutable logging systems",
        ];
      default:
        return ["Data integrity fundamentals"];
    }
  }
 
  // Default to availability expertise
  switch (level) {
    case "None":
      return ["No specific expertise required"];
    case "Low":
      return ["Basic system monitoring", "Manual recovery procedures"];
    case "Moderate":
      return ["System redundancy", "Backup management", "Basic load balancing"];
    case "High":
      return [
        "High availability architecture",
        "Disaster recovery",
        "Advanced monitoring",
        "Automated failover",
      ];
    case "Very High":
      return [
        "Distributed systems",
        "Site reliability engineering",
        "Global load balancing",
        "Chaos engineering",
        "Real-time recovery systems",
      ];
    default:
      return ["System reliability fundamentals"];
  }
}
 
export default TechnicalDetailsWidget;