#pragma checksum "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b9755829a93b8885d31a04b6538c758c97966a9e"
// <auto-generated/>
#pragma warning disable 1591
namespace Analysis.Pages
{
    #line hidden
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Components;
#nullable restore
#line 1 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using System.Net.Http;

#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using System.Net.Http.Json;

#line default
#line hidden
#nullable disable
#nullable restore
#line 4 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Microsoft.AspNetCore.Components.Routing;

#line default
#line hidden
#nullable disable
#nullable restore
#line 5 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Microsoft.AspNetCore.Components.Web;

#line default
#line hidden
#nullable disable
#nullable restore
#line 6 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Microsoft.AspNetCore.Components.WebAssembly.Http;

#line default
#line hidden
#nullable disable
#nullable restore
#line 7 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Microsoft.JSInterop;

#line default
#line hidden
#nullable disable
#nullable restore
#line 8 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Analysis;

#line default
#line hidden
#nullable disable
#nullable restore
#line 9 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Analysis.Shared;

#line default
#line hidden
#nullable disable
#nullable restore
#line 10 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Analysis.Models;

#line default
#line hidden
#nullable disable
#nullable restore
#line 11 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using Analysis.Services;

#line default
#line hidden
#nullable disable
#nullable restore
#line 12 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using System.Globalization;

#line default
#line hidden
#nullable disable
#nullable restore
#line 13 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using System.IO;

#line default
#line hidden
#nullable disable
#nullable restore
#line 14 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using System.Text.Json;

#line default
#line hidden
#nullable disable
#nullable restore
#line 15 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\_Imports.razor"
using System.Text;

#line default
#line hidden
#nullable disable
#nullable restore
#line 4 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
using Microsoft.AspNetCore.Components.Forms;

#line default
#line hidden
#nullable disable
    [Microsoft.AspNetCore.Components.RouteAttribute("/questions")]
    public partial class Calculator : Microsoft.AspNetCore.Components.ComponentBase
    {
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
            __builder.OpenElement(0, "h1");
            __builder.AddAttribute(1, "class", "alert-danger");
            __builder.AddContent(2, 
#nullable restore
#line 6 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                          errorText

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(3, "\r\n");
            __builder.OpenElement(4, "button");
            __builder.AddAttribute(5, "style", "margin-right: 5px");
            __builder.AddAttribute(6, "class", "btn btn-success float-right");
            __builder.AddAttribute(7, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 7 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                ShowResult

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(8, "Výsledek <span class=\"oi oi-badge\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(9, "\r\n");
            __builder.OpenElement(10, "button");
            __builder.AddAttribute(11, "style", "margin-right: 5px");
            __builder.AddAttribute(12, "class", "btn btn-info float-right");
            __builder.AddAttribute(13, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 8 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                             ShowTables

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(14, "Tabulky <span class=\"oi oi-clipboard\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(15, "\r\n");
            __builder.OpenElement(16, "button");
            __builder.AddAttribute(17, "style", "margin-right: 5px");
            __builder.AddAttribute(18, "class", "btn btn-primary float-right");
            __builder.AddAttribute(19, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 9 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                ShowQuestions

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(20, "Otázky <span class=\"oi oi-spreadsheet\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(21, "\r\n");
#nullable restore
#line 10 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
 if (showQuestions)
{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(22, "\t");
            __builder.OpenElement(23, "h1");
            __builder.AddMarkupContent(24, "\r\n\t\tOtázky\r\n\t\t");
            __builder.OpenElement(25, "button");
            __builder.AddAttribute(26, "style", "margin-right: 5px");
            __builder.AddAttribute(27, "class", "btn btn-outline-danger");
            __builder.AddAttribute(28, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 14 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                   ResetModel

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(29, "Nové");
            __builder.CloseElement();
            __builder.AddMarkupContent(30, "\r\n\t\t");
            __builder.OpenElement(31, "button");
            __builder.AddAttribute(32, "style", "margin-right: 5px");
            __builder.AddAttribute(33, "class", "btn btn-outline-dark");
            __builder.AddAttribute(34, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 15 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                 DefaultModel

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(35, "Přednastavené");
            __builder.CloseElement();
            __builder.AddMarkupContent(36, "\r\n\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(37, "\r\n");
#nullable restore
#line 17 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
     if (analysisModel == null)
	{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(38, "\t\t");
            __builder.AddMarkupContent(39, "<p><em>Načítám...</em></p>\r\n");
#nullable restore
#line 20 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	}
	else
	{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(40, "\t\t<div class=\"section-line\"></div>\r\n");
#nullable restore
#line 24 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
		foreach (var section in analysisModel.Sections.OrderBy(x => x.SectionType))
		{
			var totalCount = 0;
			var count = 0;
			var questions = section.Questions;
			SetSectionTitle(section.SectionType);

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(41, "\t\t\t");
            __builder.OpenElement(42, "div");
            __builder.AddAttribute(43, "style", "cursor:pointer");
            __builder.AddAttribute(44, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 30 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                  () => ShowSection(section)

#line default
#line hidden
#nullable disable
            ));
            __builder.OpenElement(45, "h2");
            __builder.AddContent(46, 
#nullable restore
#line 30 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                   sectionTitle

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(47, " ");
            __builder.OpenElement(48, "span");
            __builder.AddAttribute(49, "class", "oi" + " small" + " " + (
#nullable restore
#line 30 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                        section.ShowSection ? "oi-arrow-circle-top" : "oi-arrow-circle-bottom"

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(50, "aria-hidden", "true");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(51, "\r\n\t\t\t<div class=\"section-line\"></div>\r\n");
#nullable restore
#line 32 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
			if (section.ShowSection)
			{
				count = 0;

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(52, "\t\t\t\t");
            __builder.OpenElement(53, "table");
            __builder.AddAttribute(54, "class", "table");
            __builder.AddMarkupContent(55, "\r\n\t\t\t\t\t");
            __builder.AddMarkupContent(56, "<thead>\r\n\t\t\t\t\t</thead>\r\n");
#nullable restore
#line 38 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                     foreach (var question in questions.OrderBy(x => x.QuestionType))
					{
						if (questionType != question.QuestionType || count == 0)
						{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(57, "\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(58, "<tbody class=\"section-line\">\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</tbody>\r\n");
#nullable restore
#line 46 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
							setQuestionType(question.QuestionType);
							totalCount = questions.Count(x => x.QuestionType == questionType);
							SetQuestionTitle(question.QuestionType);
							count = 0;

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(59, "\t\t\t\t\t\t\t");
            __builder.OpenElement(60, "h3");
            __builder.AddContent(61, 
#nullable restore
#line 50 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                 questionTitle

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(62, "\r\n\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(63, "<thead>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<th class=\"th-question\">Otázka</th>\r\n\t\t\t\t\t\t\t\t\t<th class=\"th-edit\"></th>\r\n\t\t\t\t\t\t\t\t\t<th class=\"th-edit\"></th>\r\n\t\t\t\t\t\t\t\t\t<th class=\"th-option\">Možnosti</th>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</thead>\r\n");
#nullable restore
#line 59 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						}
						count++;

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(64, "\t\t\t\t\t\t");
            __builder.OpenElement(65, "tbody");
            __builder.AddMarkupContent(66, "\r\n\t\t\t\t\t\t\t");
            __builder.OpenElement(67, "tr");
            __builder.AddMarkupContent(68, "\r\n");
#nullable restore
#line 63 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                 if (question.Edit)
								{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(69, "\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(70, "td");
            __builder.AddAttribute(71, "class", "td-question");
            __builder.AddMarkupContent(72, "\r\n\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(73, "input");
            __builder.AddAttribute(74, "class", "form-control");
            __builder.AddAttribute(75, "type", "text");
            __builder.AddAttribute(76, "style", "background-color:lightyellow;");
            __builder.AddAttribute(77, "value", 
#nullable restore
#line 68 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                       question.Question

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(78, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.ChangeEventArgs>(this, 
#nullable restore
#line 69 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                           e => { question.Question = e.Value.ToString(); }

#line default
#line hidden
#nullable disable
            ));
            __builder.CloseElement();
            __builder.AddMarkupContent(79, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(80, "\r\n");
#nullable restore
#line 71 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
								}
								else
								{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(81, "\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(82, "td");
            __builder.AddAttribute(83, "class", "td-question");
            __builder.AddContent(84, 
#nullable restore
#line 74 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                             question.Question

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(85, "\r\n");
#nullable restore
#line 75 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
								}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(86, "\t\t\t\t\t\t\t\t");
            __builder.OpenElement(87, "td");
            __builder.AddAttribute(88, "class", "td-edit");
            __builder.OpenElement(89, "div");
            __builder.AddAttribute(90, "style", "cursor:pointer");
            __builder.AddAttribute(91, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 76 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                          () => QuestionEdit(question)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(92, "<span class=\"oi oi-pencil\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(93, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(94, "td");
            __builder.AddAttribute(95, "class", "td-edit");
            __builder.OpenElement(96, "div");
            __builder.AddAttribute(97, "style", "cursor:pointer");
            __builder.AddAttribute(98, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 77 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                          () => RemoveQuestion(questions, question)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(99, "<span class=\"oi oi-trash\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(100, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(101, "td");
            __builder.AddAttribute(102, "class", "td-answer");
            __builder.AddMarkupContent(103, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(104, "table");
            __builder.AddMarkupContent(105, "\r\n\t\t\t\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(106, @"<thead>
										<th class=""th-answer th-description"">Popis</th>
										<th class></th>
										<th class=""th-answer th-description"">Body</th>
										<th class></th>
										<th class=""th-answer-value th-points"">Vybráno</th>
										</thead>
");
#nullable restore
#line 87 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                         foreach (var answer in question.Answers.OrderBy(x => x.Value))
										{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(107, "\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(108, "tr");
            __builder.AddMarkupContent(109, "\r\n");
#nullable restore
#line 90 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                 if (answer.Edit)
												{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(110, "\t\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(111, "td");
            __builder.AddAttribute(112, "class", "td-answer");
            __builder.AddMarkupContent(113, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(114, "input");
            __builder.AddAttribute(115, "class", "form-control");
            __builder.AddAttribute(116, "type", "text");
            __builder.AddAttribute(117, "style", "background-color:lightyellow;");
            __builder.AddAttribute(118, "value", 
#nullable restore
#line 95 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                       answer.Answer

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(119, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.ChangeEventArgs>(this, 
#nullable restore
#line 96 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                           e => { answer.Answer = e.Value.ToString(); }

#line default
#line hidden
#nullable disable
            ));
            __builder.CloseElement();
            __builder.AddMarkupContent(120, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(121, "\r\n");
#nullable restore
#line 98 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
												}
												else
												{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(122, "\t\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(123, "td");
            __builder.AddAttribute(124, "class", "td-answer");
            __builder.AddContent(125, 
#nullable restore
#line 101 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                           answer.Answer

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(126, "\r\n");
#nullable restore
#line 102 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
												}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(127, "\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(128, "td");
            __builder.AddAttribute(129, "class", "td-answer-edit");
            __builder.OpenElement(130, "div");
            __builder.AddAttribute(131, "style", "cursor:pointer");
            __builder.AddAttribute(132, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 103 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                 () => AnswerEdit(answer)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(133, "<span class=\"oi oi-pencil\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(134, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(135, "td");
            __builder.AddAttribute(136, "class", "td-answer answer-points-text");
            __builder.AddContent(137, 
#nullable restore
#line 104 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                          answer.Value

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(138, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(139, "td");
            __builder.AddAttribute(140, "class", "td-answer-edit");
            __builder.AddMarkupContent(141, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(142, "div");
            __builder.AddAttribute(143, "style", "cursor:pointer");
            __builder.AddAttribute(144, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 106 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                          () => AddPoint(question.Answers, answer)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(145, "<span class=\"oi oi-plus small\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(146, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(147, "div");
            __builder.AddAttribute(148, "style", "cursor:pointer");
            __builder.AddAttribute(149, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 107 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                          () => RemovePoint(question.Answers, answer)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(150, "<span class=\"oi oi-minus small\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(151, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(152, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(153, "td");
            __builder.AddAttribute(154, "class", "td-answer-value answer-checkBox");
            __builder.OpenElement(155, "input");
            __builder.AddAttribute(156, "class", "answer-checkBox");
            __builder.AddAttribute(157, "type", "checkbox");
            __builder.AddAttribute(158, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 109 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                                                                              () => CheckChanged(question, answer.Value)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(159, "checked", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line 109 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                                                   answer.IsChosen

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(160, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => answer.IsChosen = __value, answer.IsChosen));
            __builder.SetUpdatesAttributeName("checked");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(161, "\r\n\t\t\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(162, "td");
            __builder.AddAttribute(163, "class", "td-answer-value answer-checkBox");
            __builder.OpenElement(164, "div");
            __builder.AddAttribute(165, "style", "cursor:pointer");
            __builder.AddAttribute(166, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 110 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                                  () => RemoveAnswer(question.Answers, answer)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(167, "<span class=\"oi oi-trash small\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(168, "\r\n\t\t\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(169, "\r\n");
#nullable restore
#line 112 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
										}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(170, "\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(171, "div");
            __builder.AddAttribute(172, "style", "cursor:pointer");
            __builder.AddAttribute(173, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 113 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                              () => AddAnswer(question.Answers, question.LowestValue)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(174, "<span class=\"oi oi-plus\" aria-hidden=\"true\">Přidat možnost</span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(175, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(176, "\r\n\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(177, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(178, "\r\n\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(179, "\r\n");
#nullable restore
#line 118 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         if (totalCount == count)
						{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(180, "\t\t\t\t\t\t\t");
            __builder.OpenElement(181, "thead");
            __builder.AddMarkupContent(182, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(183, "tr");
            __builder.AddMarkupContent(184, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(185, "th");
            __builder.AddMarkupContent(186, "\r\n\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(187, "div");
            __builder.AddAttribute(188, "style", "cursor:pointer");
            __builder.AddAttribute(189, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 123 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                              () => AddQuestion(questions, question.QuestionType)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(190, "<span class=\"oi oi-plus\" aria-hidden=\"true\">Přidat otázku</span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(191, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(192, "\r\n\t\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t\t<th></th>\r\n\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(193, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(194, "\r\n\t\t\t\t\t\t\t");
            __builder.OpenElement(195, "tbody");
            __builder.AddMarkupContent(196, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(197, "tr");
            __builder.AddMarkupContent(198, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(199, "<td>Celkový počet bodů </td>\r\n\t\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(200, "td");
            __builder.AddMarkupContent(201, "\r\n");
#nullable restore
#line 136 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                          
											var allAnswers = questions.Where(x => x.QuestionType == questionType).Select(x => x.Answers).ToList();
											var totalValue = 0;
											var chosenValue = 0;
											allAnswers.ForEach(x => totalValue += x.Select(x => x.Value).DefaultIfEmpty().Max());
											allAnswers.ForEach(x => chosenValue += x.Where(y => y.IsChosen)?.FirstOrDefault() != null ? x.Where(y => y.IsChosen).First().Value : 0);
											question.Value = chosenValue;
											question.MaxValue = totalValue;
										

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(202, "\t\t\t\t\t\t\t\t\t\t");
            __builder.AddContent(203, 
#nullable restore
#line 145 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                         question.Value.ToString()

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(204, " / ");
            __builder.AddContent(205, 
#nullable restore
#line 145 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                      question.MaxValue.ToString()

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(206, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(207, "\r\n\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(208, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(209, "\r\n");
#nullable restore
#line 149 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						}

#line default
#line hidden
#nullable disable
#nullable restore
#line 149 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         
					}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(210, "\t\t\t\t\t");
            __builder.AddMarkupContent(211, "<tbody>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(212, "\r\n");
#nullable restore
#line 156 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
			}
		}
	}

#line default
#line hidden
#nullable disable
#nullable restore
#line 158 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
     
}
else if (showTables)
{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(213, "\t");
            __builder.AddMarkupContent(214, "<h1>Tabulky</h1>\r\n");
#nullable restore
#line 163 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	foreach (var ratingTable in ratingTables)
	{
		SetSectionTitle(ratingTable.SectionType);

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(215, "\t\t");
            __builder.OpenElement(216, "div");
            __builder.AddAttribute(217, "style", "cursor:pointer");
            __builder.AddAttribute(218, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 166 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                              () => ShowTable(ratingTable)

#line default
#line hidden
#nullable disable
            ));
            __builder.OpenElement(219, "h2");
            __builder.AddContent(220, 
#nullable restore
#line 166 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                 sectionTitle

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(221, " ");
            __builder.OpenElement(222, "span");
            __builder.AddAttribute(223, "class", "oi" + " small" + " " + (
#nullable restore
#line 166 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                      ratingTable.ShowTable ? "oi-arrow-circle-top" : "oi-arrow-circle-bottom"

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(224, "aria-hidden", "true");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(225, "\r\n");
#nullable restore
#line 167 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
		if (ratingTable.ShowTable)
		{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(226, "\t\t\t");
            __builder.OpenElement(227, "table");
            __builder.AddAttribute(228, "style", "width:40%");
            __builder.AddAttribute(229, "class", "table");
            __builder.AddMarkupContent(230, "\r\n\t\t\t\t");
            __builder.AddMarkupContent(231, "<thead>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\tHodnocení %\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\tHodnota\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</thead>\r\n\t\t\t\t");
            __builder.OpenElement(232, "tbody");
            __builder.AddMarkupContent(233, "\r\n");
#nullable restore
#line 181 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                      
						var count = 0;
						var totalCount = ratingTable.Ratings.Count;
					

#line default
#line hidden
#nullable disable
#nullable restore
#line 185 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                     foreach (var rating in ratingTable.Ratings.OrderBy(x => x.MinValue))
					{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(234, "\t\t\t\t\t\t");
            __builder.OpenElement(235, "tr");
            __builder.AddMarkupContent(236, "\r\n");
#nullable restore
#line 188 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                             if (!rating.Edit)
							{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(237, "\t\t\t\t\t\t\t\t");
            __builder.OpenElement(238, "td");
            __builder.AddContent(239, 
#nullable restore
#line 190 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                     rating.MinValue

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(240, " % - ");
            __builder.AddContent(241, 
#nullable restore
#line 190 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                          rating.MaxValue

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(242, " %");
            __builder.CloseElement();
            __builder.AddMarkupContent(243, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(244, "td");
            __builder.AddContent(245, 
#nullable restore
#line 191 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                     rating.Name

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(246, "\r\n");
#nullable restore
#line 192 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
							}
							else
							{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(247, "\t\t\t\t\t\t\t\t");
            __builder.OpenElement(248, "td");
            __builder.AddMarkupContent(249, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(250, "input");
            __builder.AddAttribute(251, "class", "form-control");
            __builder.AddAttribute(252, "type", "number");
            __builder.AddAttribute(253, "style", "background-color:lightyellow;");
            __builder.AddAttribute(254, "value", 
#nullable restore
#line 198 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                   rating.MinValue

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(255, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.ChangeEventArgs>(this, 
#nullable restore
#line 199 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                       e => { rating.MinValue = EditRatingValue(e.Value.ToString(), ratingTable.Ratings.OrderBy(x => x.MinValue).ToList(), true, rating); }

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(256, "max", "100");
            __builder.CloseElement();
            __builder.AddMarkupContent(257, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(258, "input");
            __builder.AddAttribute(259, "class", "form-control");
            __builder.AddAttribute(260, "type", "number");
            __builder.AddAttribute(261, "style", "background-color:lightyellow;");
            __builder.AddAttribute(262, "value", 
#nullable restore
#line 202 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                   rating.MaxValue

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(263, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.ChangeEventArgs>(this, 
#nullable restore
#line 203 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                       e => { rating.MaxValue = Convert.ToInt32(e.Value.ToString()); }

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(264, "min", 
#nullable restore
#line 203 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                                count == 0 ? 0 + 1 : ratingTable.Ratings[count - 1].MaxValue > 0 ? ratingTable.Ratings[count - 1].MaxValue + 1 : 0

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(265, "max", "100");
            __builder.CloseElement();
            __builder.AddMarkupContent(266, "\r\n\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(267, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(268, "td");
            __builder.AddMarkupContent(269, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(270, "input");
            __builder.AddAttribute(271, "class", "form-control");
            __builder.AddAttribute(272, "type", "text");
            __builder.AddAttribute(273, "style", "background-color:lightyellow;");
            __builder.AddAttribute(274, "value", 
#nullable restore
#line 208 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                   rating.Name

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(275, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.ChangeEventArgs>(this, 
#nullable restore
#line 209 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                       e => { rating.Name = e.Value.ToString(); }

#line default
#line hidden
#nullable disable
            ));
            __builder.CloseElement();
            __builder.AddMarkupContent(276, "\r\n\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(277, "\r\n");
#nullable restore
#line 211 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
							}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(278, "\t\t\t\t\t\t\t");
            __builder.OpenElement(279, "td");
            __builder.AddMarkupContent(280, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(281, "div");
            __builder.AddAttribute(282, "style", "cursor:pointer");
            __builder.AddAttribute(283, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 213 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                      () => RatingEdit(rating)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(284, " <span class=\"oi small oi-pencil\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(285, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(286, "\r\n\t\t\t\t\t\t\t");
            __builder.OpenElement(287, "td");
            __builder.AddMarkupContent(288, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(289, "div");
            __builder.AddAttribute(290, "style", "cursor:pointer");
            __builder.AddAttribute(291, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 216 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                      () => RemoveRating(ratingTable.Ratings, rating)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(292, " <span class=\"oi small oi-trash\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(293, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(294, "\r\n\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(295, "\r\n");
#nullable restore
#line 219 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						count++;
					}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(296, "\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(297, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(298, "\r\n\t\t\t");
            __builder.OpenElement(299, "div");
            __builder.AddAttribute(300, "style", "cursor:pointer");
            __builder.AddAttribute(301, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 223 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                  () => AddRating(ratingTable.Ratings)

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(302, " <span class=\"oi small oi-plus\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.AddMarkupContent(303, "\r\n");
#nullable restore
#line 224 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
		}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(304, "\t\t<div class=\"section-line\"></div>\r\n");
#nullable restore
#line 226 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	}
}
else if (showResult)
{
	decimal calculatedValue = 0;
	decimal rate = 0;


#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(305, "\t");
            __builder.AddMarkupContent(306, "<h1>Výsledek</h1>\r\n");
#nullable restore
#line 234 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"

	Calculate();
	var groupedSectionResults = sectionResults.GroupBy(x => x.SectionType);
	foreach (var groupedSection in groupedSectionResults)
	{
		SetSectionTitle(groupedSection.Key);

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(307, "\t\t");
            __builder.OpenElement(308, "div");
            __builder.AddAttribute(309, "style", "cursor:pointer");
            __builder.OpenElement(310, "h2");
            __builder.AddContent(311, 
#nullable restore
#line 240 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                         sectionTitle

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(312, " <span class=\"oi small\" aria-hidden=\"true\"></span>");
            __builder.CloseElement();
            __builder.CloseElement();
            __builder.AddMarkupContent(313, "\r\n\t\t");
            __builder.OpenElement(314, "table");
            __builder.AddAttribute(315, "style", "width:40%");
            __builder.AddAttribute(316, "class", "table");
            __builder.AddMarkupContent(317, "\r\n\t\t\t");
            __builder.OpenElement(318, "thead");
            __builder.AddMarkupContent(319, "\r\n\t\t\t\t");
            __builder.OpenElement(320, "tr");
            __builder.AddMarkupContent(321, "\r\n");
#nullable restore
#line 244 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                     if (groupedSection.Key != SectionType.OrganizationalSecurityAspects && groupedSection.Key != SectionType.RegimeSecurityAspects)
					{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(322, "\t\t\t\t\t\t");
            __builder.AddMarkupContent(323, "<th>\r\n\t\t\t\t\t\t\tAspekty\r\n\t\t\t\t\t\t</th>\r\n");
#nullable restore
#line 249 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
					}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(324, "\t\t\t\t\t");
            __builder.AddMarkupContent(325, "<th>\r\n\t\t\t\t\t\tBodová hodnota\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t");
            __builder.AddMarkupContent(326, "<th>\r\n\t\t\t\t\t\tHodnota\r\n\t\t\t\t\t</th>\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(327, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(328, "\r\n");
#nullable restore
#line 258 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
             foreach (var section in groupedSection)
			{
				//<div style="cursor:pointer" @onclick="() => ShowTable(ratingTable)"><h2>@sectionTitle <span class="oi small @(ratingTable.ShowTable ? "oi-arrow-circle-top" : "oi-arrow-circle-bottom")" aria-hidden="true"></span></h2></div>

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(329, "\t\t\t\t");
            __builder.OpenElement(330, "tbody");
            __builder.AddMarkupContent(331, "\r\n\t\t\t\t\t");
            __builder.OpenElement(332, "tr");
            __builder.AddMarkupContent(333, "\r\n");
#nullable restore
#line 263 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         if (section.SectionType != SectionType.OrganizationalSecurityAspects && section.SectionType != SectionType.RegimeSecurityAspects)
						{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(334, "\t\t\t\t\t\t\t");
            __builder.OpenElement(335, "td");
            __builder.AddContent(336, 
#nullable restore
#line 265 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                 section.Name

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(337, "\r\n");
#nullable restore
#line 266 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						}

#line default
#line hidden
#nullable disable
#nullable restore
#line 267 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         if (section.AllowEdit)
						{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(338, "\t\t\t\t\t\t\t");
            __builder.OpenElement(339, "td");
            __builder.AddAttribute(340, "class", "td-answer");
            __builder.AddMarkupContent(341, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(342, "input");
            __builder.AddAttribute(343, "class", "form-control");
            __builder.AddAttribute(344, "type", "number");
            __builder.AddAttribute(345, "style", "background-color:lightyellow;");
            __builder.AddAttribute(346, "value", 
#nullable restore
#line 272 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                               section.Value

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(347, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.ChangeEventArgs>(this, 
#nullable restore
#line 273 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                   e => { section.Value = (int)e.Value; }

#line default
#line hidden
#nullable disable
            ));
            __builder.AddAttribute(348, "placeholder", 
#nullable restore
#line 273 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                          section.Value

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(349, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(350, "input");
            __builder.AddAttribute(351, "class", "form-control");
            __builder.AddAttribute(352, "type", "number");
            __builder.AddAttribute(353, "style", "background-color:lightyellow;");
            __builder.AddAttribute(354, "value", 
#nullable restore
#line 276 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                               section.MaxValue

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(355, "oninput", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.ChangeEventArgs>(this, 
#nullable restore
#line 277 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                   e => { section.MaxValue = (int)e.Value; }

#line default
#line hidden
#nullable disable
            ));
            __builder.CloseElement();
            __builder.AddMarkupContent(356, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(357, "\r\n");
#nullable restore
#line 279 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						}
						else
						{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(358, "\t\t\t\t\t\t\t");
            __builder.OpenElement(359, "td");
            __builder.AddContent(360, 
#nullable restore
#line 282 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                 section.Value

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(361, " bodů z ");
            __builder.AddContent(362, 
#nullable restore
#line 282 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                       section.MaxValue

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(363, " bodů maximálně");
            __builder.CloseElement();
            __builder.AddMarkupContent(364, "\r\n");
#nullable restore
#line 283 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(365, "\t\t\t\t\t\t");
            __builder.OpenElement(366, "td");
            __builder.AddMarkupContent(367, "\r\n\t\t\t\t\t\t\t");
            __builder.AddContent(368, 
#nullable restore
#line 285 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                             section.Result.ToString("P")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(369, " - ");
            __builder.AddContent(370, 
#nullable restore
#line 285 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                             ratingTables.Where(x => x.SectionType == section.SectionType).FirstOrDefault().Ratings.Where(y => y.MinValue <= section.Result * 100 && y.MaxValue >= section.Result * 100).FirstOrDefault().Name

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(371, "\r\n\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(372, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(373, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(374, "\r\n");
#nullable restore
#line 289 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
			}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(375, "\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(376, "\r\n");
#nullable restore
#line 291 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
		foreach (var sectionResult in groupedSection)
		{
			var calculation = new SectionResultCalculatedModel()
			{
				SectionType = groupedSection.Key,
				QuestionType = sectionResult.QuestionType,
				Name = sectionResult.QuestionType != null ? GetQuestionName(sectionResult.QuestionType) : GetSectionName(sectionResult.SectionType),
				Result = sectionResult.Result,
				ResultType = GetResultType(sectionResult.SectionType)
			};
			if (calculatedResults.Any(x => x.ResultType == calculation.ResultType && x.SectionType == calculation.SectionType && x.QuestionType == calculation.QuestionType))
			{
				calculatedResults.FirstOrDefault(x => x.ResultType == calculation.ResultType && x.SectionType == calculation.SectionType && x.QuestionType == calculation.QuestionType).Result = calculation.Result;
			}
			else
				calculatedResults.Add(calculation);
		}
	}

	foreach (var calculatedResult in calculatedResults.GroupBy(x => x.ResultType))
	{
		SetResultTitle(calculatedResult.Key);
		calculatedValue = 0;
		rate = 0;

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(377, "\t\t");
            __builder.OpenElement(378, "div");
            __builder.AddAttribute(379, "style", "cursor:pointer");
            __builder.AddMarkupContent(380, "\r\n\t\t\t");
            __builder.OpenElement(381, "h2");
            __builder.AddMarkupContent(382, "\r\n\t\t\t\t");
            __builder.AddContent(383, 
#nullable restore
#line 317 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                 resultTitle

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(384, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(385, "\r\n\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(386, "\r\n\t\t");
            __builder.OpenElement(387, "table");
            __builder.AddAttribute(388, "style", "width:40%");
            __builder.AddAttribute(389, "class", "table");
            __builder.AddMarkupContent(390, "\r\n\t\t\t");
            __builder.AddMarkupContent(391, "<thead>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tAspekty\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tVáha\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<th>\r\n\t\t\t\t\t\tÚroveň bezpečnosti\r\n\t\t\t\t\t</th>\r\n\t\t\t\t</tr>\r\n\t\t\t</thead>\r\n\r\n");
#nullable restore
#line 335 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
             foreach (var result in calculatedResult)
			{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(392, "\t\t\t\t");
            __builder.OpenElement(393, "tbody");
            __builder.AddMarkupContent(394, "\r\n\t\t\t\t\t");
            __builder.OpenElement(395, "tr");
            __builder.AddMarkupContent(396, "\r\n\t\t\t\t\t\t");
            __builder.OpenElement(397, "td");
            __builder.AddContent(398, 
#nullable restore
#line 339 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                             result.Name

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(399, "\r\n");
#nullable restore
#line 340 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         if (!result.Edit)
						{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(400, "\t\t\t\t\t\t\t");
            __builder.OpenElement(401, "td");
            __builder.AddAttribute(402, "class", "td-answer");
            __builder.AddMarkupContent(403, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(404, "input");
            __builder.AddAttribute(405, "class", "form-control");
            __builder.AddAttribute(406, "type", "number");
            __builder.AddAttribute(407, "step", "0.01");
            __builder.AddAttribute(408, "min", "0");
            __builder.AddAttribute(409, "max", "1");
            __builder.AddAttribute(410, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line 343 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                    result.Rate

#line default
#line hidden
#nullable disable
            , culture: global::System.Globalization.CultureInfo.InvariantCulture));
            __builder.AddAttribute(411, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => result.Rate = __value, result.Rate, culture: global::System.Globalization.CultureInfo.InvariantCulture));
            __builder.SetUpdatesAttributeName("value");
            __builder.CloseElement();
            __builder.AddMarkupContent(412, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(413, "\r\n");
#nullable restore
#line 345 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						}
						else
						{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(414, "\t\t\t\t\t\t\t");
            __builder.OpenElement(415, "td");
            __builder.AddContent(416, 
#nullable restore
#line 348 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                 result.Rate.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(417, " (");
            __builder.AddContent(418, 
#nullable restore
#line 348 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                 (result.Rate).ToString("P")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(419, ")");
            __builder.CloseElement();
            __builder.AddMarkupContent(420, "\r\n");
#nullable restore
#line 349 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
						}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(421, "\t\t\t\t\t\t");
            __builder.OpenElement(422, "td");
            __builder.AddMarkupContent(423, "\r\n\t\t\t\t\t\t\t");
            __builder.AddContent(424, 
#nullable restore
#line 351 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                             result.Result.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(425, " - ");
            __builder.AddContent(426, 
#nullable restore
#line 351 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                               result.Result.ToString("P")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(427, "\r\n\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(428, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(429, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(430, "\r\n");
#nullable restore
#line 355 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
				rate += result.Rate;
				calculatedValue += (result.Rate * result.Result);
			}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(431, "\t\t\t");
            __builder.OpenElement(432, "tbody");
            __builder.AddMarkupContent(433, "\r\n\t\t\t\t");
            __builder.OpenElement(434, "tr");
            __builder.AddMarkupContent(435, "\r\n\t\t\t\t\t");
            __builder.AddMarkupContent(436, "<td>\r\n\t\t\t\t\t\tVypočítaná hodnota\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t");
            __builder.OpenElement(437, "td");
            __builder.AddMarkupContent(438, "\r\n\t\t\t\t\t\t");
            __builder.AddContent(439, 
#nullable restore
#line 364 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         rate.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(440, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(441, "\r\n\t\t\t\t\t");
            __builder.OpenElement(442, "td");
            __builder.AddMarkupContent(443, "\r\n\t\t\t\t\t\t");
            __builder.AddContent(444, 
#nullable restore
#line 367 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         calculatedValue.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(445, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(446, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(447, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(448, "\r\n\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(449, "\r\n");
#nullable restore
#line 372 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
		var calculation = new ResultModel()
		{
			ResultType = calculatedResult.Key,
			Result = calculatedValue
		};
		if (results.Any(x => x.ResultType == calculation.ResultType))
		{
			results.FirstOrDefault(x => x.ResultType == calculation.ResultType).Result = calculation.Result;
		}
		else
			results.Add(calculation);

		

#line default
#line hidden
#nullable disable
#nullable restore
#line 384 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
         if (rate != 1)
		{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(450, "\t\t\t");
            __builder.AddMarkupContent(451, "<span class=\"alert-danger\">Součet hodnot vah se musí = 1</span>\r\n");
#nullable restore
#line 387 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
		}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(452, "\t\t<div class=\"section-line\"></div>\r\n\t\t<div class=\"section-line\"></div>\r\n");
#nullable restore
#line 390 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	}


#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(453, "\t");
            __builder.AddMarkupContent(454, "<div style=\"cursor:pointer\">\r\n\t\t<h2>\r\n\t\t\tHodnocení zranitelnosti\r\n\t\t</h2>\r\n\t</div>\r\n");
#nullable restore
#line 397 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	calculatedValue = 0;
	rate = 0;

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(455, "\t");
            __builder.OpenElement(456, "table");
            __builder.AddAttribute(457, "style", "width:40%");
            __builder.AddAttribute(458, "class", "table");
            __builder.AddMarkupContent(459, "\r\n\t\t");
            __builder.AddMarkupContent(460, "<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>\r\n\t\t\t\t\tAspekty\r\n\t\t\t\t</th>\r\n\t\t\t\t<th>\r\n\t\t\t\t\tVáha\r\n\t\t\t\t</th>\r\n\t\t\t\t<th>\r\n\t\t\t\t\tÚroveň bezpečnosti\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n");
#nullable restore
#line 413 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
         foreach (var result in results.Where(x => x.ResultType == ResultType.InternalVulnerabilityResult || x.ResultType == ResultType.ExternalVulnerabilityResult).OrderBy(x => x.ResultType))
		{
			SetResultTitle(result.ResultType);

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(461, "\t\t\t");
            __builder.OpenElement(462, "tbody");
            __builder.AddMarkupContent(463, "\r\n\t\t\t\t");
            __builder.OpenElement(464, "tr");
            __builder.AddMarkupContent(465, "\r\n\t\t\t\t\t");
            __builder.OpenElement(466, "td");
            __builder.AddContent(467, 
#nullable restore
#line 418 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         resultTitle

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(468, "\r\n\t\t\t\t\t");
            __builder.OpenElement(469, "td");
            __builder.AddAttribute(470, "class", "td-answer");
            __builder.AddMarkupContent(471, "\r\n\t\t\t\t\t\t");
            __builder.OpenElement(472, "input");
            __builder.AddAttribute(473, "class", "form-control");
            __builder.AddAttribute(474, "type", "number");
            __builder.AddAttribute(475, "step", "0.01");
            __builder.AddAttribute(476, "min", "0");
            __builder.AddAttribute(477, "max", "1");
            __builder.AddAttribute(478, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line 420 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                            result.Rate

#line default
#line hidden
#nullable disable
            , culture: global::System.Globalization.CultureInfo.InvariantCulture));
            __builder.AddAttribute(479, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => result.Rate = __value, result.Rate, culture: global::System.Globalization.CultureInfo.InvariantCulture));
            __builder.SetUpdatesAttributeName("value");
            __builder.CloseElement();
            __builder.AddMarkupContent(480, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(481, "\r\n\t\t\t\t\t");
            __builder.OpenElement(482, "td");
            __builder.AddMarkupContent(483, "\r\n\t\t\t\t\t\t");
            __builder.AddContent(484, 
#nullable restore
#line 423 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         result.Result.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(485, " - ");
            __builder.AddContent(486, 
#nullable restore
#line 423 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                           result.Result.ToString("P")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(487, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(488, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(489, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(490, "\r\n");
#nullable restore
#line 427 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
			calculatedValue += result.Rate * result.Result;
			rate += result.Rate;
		}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(491, "\t\t");
            __builder.OpenElement(492, "tbody");
            __builder.AddMarkupContent(493, "\r\n\t\t\t");
            __builder.OpenElement(494, "tr");
            __builder.AddMarkupContent(495, "\r\n\t\t\t\t");
            __builder.AddMarkupContent(496, "<td>\r\n\t\t\t\t\tVypočítaná hodnota\r\n\t\t\t\t</td>\r\n\t\t\t\t");
            __builder.OpenElement(497, "td");
            __builder.AddMarkupContent(498, "\r\n\t\t\t\t\t");
            __builder.AddContent(499, 
#nullable restore
#line 436 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                     rate.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(500, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(501, "\r\n\t\t\t\t");
            __builder.OpenElement(502, "td");
            __builder.AddMarkupContent(503, "\r\n\t\t\t\t\t");
            __builder.AddContent(504, 
#nullable restore
#line 439 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                     calculatedValue.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(505, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(506, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(507, "\r\n\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(508, "\r\n\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(509, "\r\n");
#nullable restore
#line 444 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	var model = new ResultModel()
	{
		ResultType = ResultType.VulnerabilityResult,
		Result = calculatedValue
	};
	if (results.Any(x => x.ResultType == model.ResultType))
	{
		results.FirstOrDefault(x => x.ResultType == model.ResultType).Result = model.Result;
	}
	else
		results.Add(model);

	

#line default
#line hidden
#nullable disable
#nullable restore
#line 456 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
     if (rate != 1)
	{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(510, "\t\t");
            __builder.AddMarkupContent(511, "<span class=\"alert-danger\">Součet hodnot vah se musí = 1</span>\r\n");
#nullable restore
#line 459 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(512, "\t<div class=\"section-line\"></div>\r\n\t<div class=\"section-line\"></div>\r\n");
            __builder.AddMarkupContent(513, "\t");
            __builder.AddMarkupContent(514, "<div style=\"cursor:pointer\">\r\n\t\t<h2>\r\n\t\t\tHodnocení bezpečnosti\r\n\t\t</h2>\r\n\t</div>\r\n");
#nullable restore
#line 468 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	calculatedValue = 0;
	rate = 0;


#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(515, "\t");
            __builder.OpenElement(516, "table");
            __builder.AddAttribute(517, "style", "width:40%");
            __builder.AddAttribute(518, "class", "table");
            __builder.AddMarkupContent(519, "\r\n\t\t");
            __builder.AddMarkupContent(520, "<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>\r\n\t\t\t\t\tAspekty\r\n\t\t\t\t</th>\r\n\t\t\t\t<th>\r\n\t\t\t\t\tVáha\r\n\t\t\t\t</th>\r\n\t\t\t\t<th>\r\n\t\t\t\t\tÚroveň bezpečnosti\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n");
#nullable restore
#line 485 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
         foreach (var result in results.Where(x => x.ResultType == ResultType.InternalSecurityResult || x.ResultType == ResultType.ExternalSecurityResult || x.ResultType == ResultType.OrganizationalRegimeResult).OrderBy(x => x.ResultType))
		{
			SetResultTitle(result.ResultType);

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(521, "\t\t\t");
            __builder.OpenElement(522, "tbody");
            __builder.AddMarkupContent(523, "\r\n\t\t\t\t");
            __builder.OpenElement(524, "tr");
            __builder.AddMarkupContent(525, "\r\n\t\t\t\t\t");
            __builder.OpenElement(526, "td");
            __builder.AddContent(527, 
#nullable restore
#line 490 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         resultTitle

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(528, "\r\n\t\t\t\t\t");
            __builder.OpenElement(529, "td");
            __builder.AddAttribute(530, "class", "td-answer");
            __builder.AddMarkupContent(531, "\r\n\t\t\t\t\t\t");
            __builder.OpenElement(532, "input");
            __builder.AddAttribute(533, "class", "form-control");
            __builder.AddAttribute(534, "type", "number");
            __builder.AddAttribute(535, "step", "0.01");
            __builder.AddAttribute(536, "min", "0");
            __builder.AddAttribute(537, "max", "1");
            __builder.AddAttribute(538, "value", Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line 492 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                            result.Rate

#line default
#line hidden
#nullable disable
            , culture: global::System.Globalization.CultureInfo.InvariantCulture));
            __builder.AddAttribute(539, "onchange", Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => result.Rate = __value, result.Rate, culture: global::System.Globalization.CultureInfo.InvariantCulture));
            __builder.SetUpdatesAttributeName("value");
            __builder.CloseElement();
            __builder.AddMarkupContent(540, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(541, "\r\n\t\t\t\t\t");
            __builder.OpenElement(542, "td");
            __builder.AddMarkupContent(543, "\r\n\t\t\t\t\t\t");
            __builder.AddContent(544, 
#nullable restore
#line 495 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                         result.Result.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(545, " - ");
            __builder.AddContent(546, 
#nullable restore
#line 495 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                           result.Result.ToString("P")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(547, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(548, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(549, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(550, "\r\n");
#nullable restore
#line 499 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
			calculatedValue += result.Rate * result.Result;
			rate += result.Rate;
		}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(551, "\t\t");
            __builder.OpenElement(552, "tbody");
            __builder.AddMarkupContent(553, "\r\n\t\t\t");
            __builder.OpenElement(554, "tr");
            __builder.AddMarkupContent(555, "\r\n\t\t\t\t");
            __builder.AddMarkupContent(556, "<td>\r\n\t\t\t\t\tVypočítaná hodnota\r\n\t\t\t\t</td>\r\n\t\t\t\t");
            __builder.OpenElement(557, "td");
            __builder.AddMarkupContent(558, "\r\n\t\t\t\t\t");
            __builder.AddContent(559, 
#nullable restore
#line 508 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                     rate.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(560, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(561, "\r\n\t\t\t\t");
            __builder.OpenElement(562, "td");
            __builder.AddMarkupContent(563, "\r\n\t\t\t\t\t");
            __builder.AddContent(564, 
#nullable restore
#line 511 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                     calculatedValue.ToString("0.00")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(565, "\r\n\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(566, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(567, "\r\n\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(568, "\r\n\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(569, "\r\n");
#nullable restore
#line 516 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	model = new ResultModel()
	{
		ResultType = ResultType.SecurityResult,
		Result = calculatedValue
	};
	if (results.Any(x => x.ResultType == model.ResultType))
	{
		results.FirstOrDefault(x => x.ResultType == model.ResultType).Result = model.Result;
	}
	else
		results.Add(model);

	

#line default
#line hidden
#nullable disable
#nullable restore
#line 528 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
     if (rate != 1)
	{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(570, "\t\t");
            __builder.AddMarkupContent(571, "<span class=\"alert-danger\">Součet hodnot vah se musí = 1</span>\r\n");
#nullable restore
#line 531 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(572, "\t<div class=\"section-line\"></div>\r\n\t<div class=\"section-line\"></div>\r\n");
            __builder.AddMarkupContent(573, "\t");
            __builder.AddMarkupContent(574, "<div style=\"cursor:pointer\">\r\n\t\t<h2>\r\n\t\t\tÚroveň bezpečnosti (Kategorizace)\r\n\t\t</h2>\r\n\t</div>\r\n");
#nullable restore
#line 540 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
	calculatedValue = 0;
	rate = 0;

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(575, "\t");
            __builder.OpenElement(576, "div");
            __builder.AddMarkupContent(577, "\r\n\t\t");
            __builder.OpenElement(578, "table");
            __builder.AddMarkupContent(579, "\r\n\t\t\t");
            __builder.OpenElement(580, "tbody");
            __builder.AddMarkupContent(581, "\r\n\t\t\t\t");
            __builder.OpenElement(582, "tr");
            __builder.AddMarkupContent(583, "\r\n\t\t\t\t\t");
            __builder.OpenElement(584, "td");
            __builder.AddMarkupContent(585, "\r\n\t\t\t\t\t\t");
            __builder.OpenElement(586, "table");
            __builder.AddAttribute(587, "class", "table");
            __builder.AddMarkupContent(588, "\r\n\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(589, "<thead>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t\t\t\tDruh\r\n\t\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t\t<th>\r\n\t\t\t\t\t\t\t\t\t\tÚroveň bezpečnosti\r\n\t\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</thead>\r\n");
#nullable restore
#line 558 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                             foreach (var result in results.Where(x => x.ResultType == ResultType.VulnerabilityResult || x.ResultType == ResultType.SecurityResult).OrderBy(x => x.ResultType))
							{
								SetResultTitle(result.ResultType);

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(590, "\t\t\t\t\t\t\t\t");
            __builder.OpenElement(591, "tbody");
            __builder.AddMarkupContent(592, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(593, "tr");
            __builder.AddMarkupContent(594, "\r\n\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(595, "td");
            __builder.AddContent(596, 
#nullable restore
#line 563 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                             resultTitle

#line default
#line hidden
#nullable disable
            );
            __builder.CloseElement();
            __builder.AddMarkupContent(597, "\r\n\t\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(598, "td");
            __builder.AddMarkupContent(599, "\r\n\t\t\t\t\t\t\t\t\t\t\t");
            __builder.AddContent(600, 
#nullable restore
#line 565 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                             result.Result.ToString("0.0000")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(601, " - ");
            __builder.AddContent(602, 
#nullable restore
#line 565 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                 result.Result.ToString("P")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(603, "\r\n\t\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(604, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(605, "\r\n\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(606, "\r\n");
#nullable restore
#line 569 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
							}

#line default
#line hidden
#nullable disable
#nullable restore
#line 570 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                              
								var finalCalculation = results.Where(x => x.ResultType == ResultType.SecurityResult).FirstOrDefault().Result - results.Where(x => x.ResultType == ResultType.VulnerabilityResult).FirstOrDefault().Result;
							

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(607, "\t\t\t\t\t\t\t");
            __builder.OpenElement(608, "tbody");
            __builder.AddMarkupContent(609, "\r\n\t\t\t\t\t\t\t\t");
            __builder.OpenElement(610, "tr");
            __builder.AddMarkupContent(611, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(612, "td");
            __builder.AddMarkupContent(613, "\r\n\t\t\t\t\t\t\t\t\t\tVypočet: ");
            __builder.AddContent(614, 
#nullable restore
#line 576 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                  results.Where(x => x.ResultType == ResultType.SecurityResult).FirstOrDefault().Result.ToString("0.0000")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(615, " - ");
            __builder.AddContent(616, 
#nullable restore
#line 576 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                                                              results.Where(x => x.ResultType == ResultType.VulnerabilityResult).FirstOrDefault().Result.ToString("0.0000")

#line default
#line hidden
#nullable disable
            );
            __builder.AddContent(617, " = ");
            __builder.AddContent(618, 
#nullable restore
#line 576 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                                                                                                                                                                                                                                                               finalCalculation.ToString("0.0000")

#line default
#line hidden
#nullable disable
            );
            __builder.AddMarkupContent(619, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(620, "\r\n\t\t\t\t\t\t\t\t\t");
            __builder.OpenElement(621, "td");
            __builder.AddMarkupContent(622, "\r\n");
#nullable restore
#line 579 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                                         if (finalCalculation < (decimal)0.50)
										{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(623, "\t\t\t\t\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(624, "<span>\r\n\t\t\t\t\t\t\t\t\t\t\t\tMalá\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n");
#nullable restore
#line 584 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
										}
										else if (finalCalculation >= (decimal)0.50 && finalCalculation <= (decimal)0.74)
										{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(625, "\t\t\t\t\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(626, "<span>\r\n\t\t\t\t\t\t\t\t\t\t\t\tStřední\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n");
#nullable restore
#line 590 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
										}
										else if (finalCalculation > (decimal)0.74)
										{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(627, "\t\t\t\t\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(628, "<span>\r\n\t\t\t\t\t\t\t\t\t\t\t\tVysoká\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n");
#nullable restore
#line 596 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
										}
										else if (finalCalculation < 0)
										{

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(629, "\t\t\t\t\t\t\t\t\t\t\t");
            __builder.AddMarkupContent(630, "<span>\r\n\t\t\t\t\t\t\t\t\t\t\t\tKritická\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n");
#nullable restore
#line 602 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
										}

#line default
#line hidden
#nullable disable
            __builder.AddMarkupContent(631, "\t\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(632, "\r\n\t\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(633, "\r\n\t\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(634, "\r\n\t\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(635, "\r\n\t\t\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(636, "\r\n\t\t\t\t\t");
            __builder.AddMarkupContent(637, @"<td>
						<table class=""table"">
							<thead>
								<tr>
									<th>
										Bodová hodnota
									</th>
									<th>
										Úroveň zabezpečení
									</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>Méně než 0.5</td>
									<td>Malá</td>
								</tr>
								<tr>
									<td>0.5 - 0.74</td>
									<td>Střední</td>
								</tr>
								<tr>
									<td>Více než 0.74</td>
									<td>Vysoká</td>
								</tr>
								<tr>
									<td>Méně než 0</td>
									<td>Kritická</td>
								</tr>
							</tbody>
						</table>
					</td>
				");
            __builder.CloseElement();
            __builder.AddMarkupContent(638, "\r\n\t\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(639, "\r\n\t\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(640, "\r\n\t");
            __builder.CloseElement();
            __builder.AddMarkupContent(641, "\r\n");
#nullable restore
#line 644 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
}

#line default
#line hidden
#nullable disable
            __builder.OpenElement(642, "button");
            __builder.AddAttribute(643, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this, 
#nullable restore
#line 645 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                  DownloadText

#line default
#line hidden
#nullable disable
            ));
            __builder.AddMarkupContent(644, "\r\n\tDownload File From Stream\r\n");
            __builder.CloseElement();
            __builder.AddMarkupContent(645, "\r\n");
            __builder.OpenElement(646, "InputFile");
            __builder.AddAttribute(647, "OnChange", 
#nullable restore
#line 648 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
                      LoadFiles

#line default
#line hidden
#nullable disable
            );
            __builder.AddAttribute(648, "multiple", true);
            __builder.CloseElement();
        }
        #pragma warning restore 1998
#nullable restore
#line 649 "C:\Users\PawLie\Documents\Development\BTSM\Security\Analysis\Pages\Calculator.razor"
       
	private AnalysisModel analysisModel;
	private QuestionType? questionType;
	private bool showQuestions;
	private bool showTables;
	private bool showResult;
	private bool showErrorText;
	private string errorText;
	private string sectionTitle;
	private string questionTitle;
	private List<RatingTableModel> ratingTables;
	private List<SectionResultModel> sectionResults;
	private List<SectionResultCalculatedModel> calculatedResults;
	private List<ResultModel> results;
	private string resultTitle;

	protected override async Task OnInitializedAsync()
	{
		analysisModel = DataService.PrepareDefaultAnalysisModel();
		ratingTables = DataService.PrepareDefaultRatingTables();
		questionType = null;
		showQuestions = true;
		calculatedResults = new List<SectionResultCalculatedModel>();
		results = new List<ResultModel>();
	}

	private void setQuestionType(QuestionType? type = null)
	{
		questionType = type;
	}

	private void CheckChanged(QuestionModel question, int value)
	{
		foreach (var answ in question.Answers.Where(x => x.Value != value))
		{
			answ.IsChosen = false;
		}
	}

	private void QuestionEdit(QuestionModel model)
	{
		if (!string.IsNullOrEmpty(model.Question) && model.Edit)
			model.Edit = !model.Edit;
	}

	private void AnswerEdit(AnswerModel model)
	{
		if (!string.IsNullOrEmpty(model.Answer) && model.Edit)
			model.Edit = !model.Edit;
	}

	private void RatingEdit(RatingModel model)
	{
		model.Edit = !model.Edit;
	}

	private void AddPoint(List<AnswerModel> answers, AnswerModel answer)
	{
		if (answers.Any(x => x.Value == answer.Value + 1))
		{
			answers.FirstOrDefault(x => x.Value == answer.Value + 1).Value = answer.Value;
			answer.Value = answer.Value + 1;
		}
	}

	private void RemovePoint(List<AnswerModel> answers, AnswerModel answer)
	{
		if (answers.Any(x => x.Value == answer.Value - 1))
		{
			answers.FirstOrDefault(x => x.Value == answer.Value - 1).Value = answer.Value;
			answer.Value = answer.Value - 1;
		}
	}

	private void RemoveAnswer(List<AnswerModel> answers, AnswerModel answer)
	{
		foreach (var ans in answers.Where(x => x.Value > answer.Value))
		{
			ans.Value = ans.Value - 1;
		}
		answers.Remove(answer);
	}

	private void RemoveRating(List<RatingModel> ratings, RatingModel rating)
	{
		ratings.Remove(rating);
	}

	private void AddRating(List<RatingModel> ratings)
	{
		var rating = new RatingModel();
		rating.MinValue = ratings.LastOrDefault().MaxValue;
		rating.MaxValue = 100;
		rating.Edit = true;
		ratings.Add(rating);
	}

	private void RemoveQuestion(List<QuestionModel> questions, QuestionModel question)
	{
		if (questions.Count(x => x.QuestionType == question.QuestionType) < 2)
		{
			question.Question = string.Empty;
			question.Edit = true;
			question.Answers = new List<AnswerModel>();
			return;
		}
		questions.Remove(question);
	}

	private void AddAnswer(List<AnswerModel> answers, int lowestValue)
	{
		var answer = new AnswerModel()
		{
			Value = answers.Select(x => x.Value).DefaultIfEmpty().Max() + 1,
			Edit = true
		};
		answers.Add(answer);
	}

	private void AddQuestion(List<QuestionModel> questions, QuestionType? questionType = null)
	{
		var lowest = questions.Where(x => x.QuestionType == questionType).Select(x => x.LowestValue).DefaultIfEmpty().Max();
		var question = new QuestionModel()
		{
			QuestionType = questionType,
			Answers = new List<AnswerModel>(),
			Question = string.Empty,
			Edit = true,
			LowestValue = lowest
		};
		questions.Add(question);
	}

	private void ShowQuestions()
	{
		if (CheckRatingTables())
		{
			showErrorText = true;
			errorText = "Tabulky hodnot nejsou vyplněny správně";
			return;
		}
		errorText = string.Empty;
		showErrorText = false;
		showQuestions = true;
		showTables = false;
		showResult = false;
	}
	private void ShowTables()
	{
		if (CheckFilledQuestions())
		{
			showErrorText = true;
			errorText = "V některé z otázek chybí označena odpověď";
			return;
		}
		errorText = string.Empty;
		showErrorText = false;
		showQuestions = false;
		showTables = true;
		showResult = false;
	}
	private void ShowResult()
	{
		if (CheckFilledQuestions())
		{
			showErrorText = true;
			errorText = "V některé z otázek chybí označena odpověď";
			return;
		}
		if (CheckRatingTables())
		{
			showErrorText = true;
			errorText = "Tabulky hodnot nejsou vyplněny správně";
			return;
		}
		errorText = string.Empty;
		showErrorText = false;
		showQuestions = false;
		showTables = false;
		showResult = true;
	}

	private bool CheckFilledQuestions()
	{
		foreach (var section in analysisModel.Sections)
		{
			foreach (var question in section.Questions)
			{
				if (!question.Answers.Any(x => x.IsChosen))
				{
					return true;
				}
			}
		}
		return false;
	}

	private bool CheckRatingTables()
	{
		foreach (var ratingTable in ratingTables)
		{
			var lastMaxValue = 0;
			foreach (var rating in ratingTable.Ratings.OrderBy(x => x.MinValue))
			{
				if (rating.MinValue != lastMaxValue || rating.MaxValue > 100 || rating.MinValue > 100 || rating.MinValue > rating.MaxValue || string.IsNullOrEmpty(rating.Name) || rating.MaxValue == 0 || (lastMaxValue == 0 && rating.MinValue != 0) || rating.MinValue < 0 || rating.MaxValue < 0)
				{
					return true;
				}
				lastMaxValue = rating.MaxValue;
			}
			if (lastMaxValue != 100)
				return true;
		}
		return false;
	}

	private void ResetModel()
	{
		analysisModel = DataService.ClearAnalysisModel();
	}

	private void DefaultModel()
	{
		analysisModel = DataService.PrepareDefaultAnalysisModel();
	}

	private void ShowSection(SectionModel section)
	{
		section.ShowSection = !section.ShowSection;
	}

	private void ShowTable(RatingTableModel model)
	{
		model.ShowTable = !model.ShowTable;
	}

	private void SetSectionTitle(SectionType sectionType)
	{
		sectionTitle = GetSectionName(sectionType);
	}

	private string GetSectionName(SectionType sectionType)
	{
		if (sectionType == SectionType.InternalVulnerabilityCriteria)
			return "Interní kritéria zranitelnosti";
		else if (sectionType == SectionType.ExternalVulnerabilityCriteria)
			return "Externí kritéria zranitelnosti";
		else if (sectionType == SectionType.InternalSecurityCriteria)
			return "Interní kritéria bezpečnosti";
		else if (sectionType == SectionType.ExternalSecurityCriteria)
			return "Externí kritéria bezpečnosti";
		else if (sectionType == SectionType.OrganizationalSecurityAspects)
			return "Organizační aspekty bezpečnosti";
		else if (sectionType == SectionType.RegimeSecurityAspects)
			return "Režimové aspekty bezpečnosti";

		return string.Empty;
	}

	private void SetResultTitle(ResultType resultType)
	{
		if (resultType == ResultType.InternalVulnerabilityResult)
			resultTitle = "Hodnocení interní zranitelnosti";
		else if (resultType == ResultType.ExternalVulnerabilityResult)
			resultTitle = "Hodnocení externí zranitelnosti";
		else if (resultType == ResultType.VulnerabilityResult)
			resultTitle = "Hodnocení zranitelnosti";
		else if (resultType == ResultType.InternalSecurityResult)
			resultTitle = "Hodnocení interní bezpečnosti";
		else if (resultType == ResultType.ExternalSecurityResult)
			resultTitle = "Hodnocení externí bezpečnosti";
		else if (resultType == ResultType.OrganizationalRegimeResult)
			resultTitle = "Režimové a organizační aspekty bezpečnosti";
		else if (resultType == ResultType.SecurityResult)
			resultTitle = "Hodnocení bezpečnosti";
	}

	private void SetQuestionTitle(QuestionType? questionType)
	{
		questionTitle = GetQuestionName(questionType);
	}

	private string GetQuestionName(QuestionType? questionType)
	{
		if (questionType == QuestionType.ISpatialAspects || questionType == QuestionType.ESpatialAspects)
			return "Prostorové aspekty";
		else if (questionType == QuestionType.ITimeAspects || questionType == QuestionType.ETimeAspects)
			return "Časové aspekty";
		else if (questionType == QuestionType.IConcentrationPeople || questionType == QuestionType.EConcentrationPeople)
			return "Koncentrace a počet osob";
		else if (questionType == QuestionType.IStructuralMechanicalAspects || questionType == QuestionType.EStructuralMechanicalAspects)
			return "Strukturální a mechanické aspekty";
		else if (questionType == QuestionType.ITechnologicalProcessAspects || questionType == QuestionType.ETechnologicalProcessAspects)
			return "Technologické a procesní aspekty";
		else
			return string.Empty;
	}

	private int EditRatingValue(string value, List<RatingModel> ratings, bool isMinCheck, RatingModel rating)
	{
		var count = ratings.IndexOf(rating);

		var totalCount = ratings.Count;
		var intValue = Convert.ToInt32(value) < 0 ? 0 : Convert.ToInt32(value);
		ratings.FirstOrDefault().MinValue = 0;
		ratings.LastOrDefault().MaxValue = 100;
		if (isMinCheck && count != 0 && count < totalCount)
		{
			if (count < totalCount - 1 && intValue < ratings[count - 1].MaxValue)
			{
				intValue = ratings[count - 1].MaxValue;
			}
			else if (count == totalCount - 1 && isMinCheck && intValue > 99)
			{
				rating.MinValue = 99;
			}
			ratings[count].MinValue = intValue;
		}
		return intValue;
	}

	private void Calculate()
	{
		sectionResults = new List<SectionResultModel>();

		foreach (var section in analysisModel.Sections.OrderBy(x => x.SectionType))
		{
			var groupedQuestions = section.Questions.GroupBy(x => x.QuestionType);
			foreach (var groupedQuestion in groupedQuestions)
			{
				var value = groupedQuestion.Sum(x => x.Value);
				var maxValue = groupedQuestion.Sum(x => x.MaxValue);
				sectionResults.Add(new SectionResultModel()
				{
					Name = GetQuestionName(groupedQuestion.Key),
					Value = value,
					MaxValue = maxValue,
					QuestionType = groupedQuestion.Key,
					Result = (decimal)value / maxValue,
					SectionType = section.SectionType
				});
			}
		}
	}
	private ResultType GetResultType(SectionType sectionType)
	{
		switch (sectionType)
		{
			case SectionType.InternalVulnerabilityCriteria:
				return ResultType.InternalVulnerabilityResult;
			case SectionType.ExternalSecurityCriteria:
				return ResultType.ExternalSecurityResult;
			case SectionType.ExternalVulnerabilityCriteria:
				return ResultType.ExternalVulnerabilityResult;
			case SectionType.InternalSecurityCriteria:
				return ResultType.InternalSecurityResult;
			case SectionType.RegimeSecurityAspects:
				return ResultType.OrganizationalRegimeResult;
			case SectionType.OrganizationalSecurityAspects:
				return ResultType.OrganizationalRegimeResult;
			default:
				return ResultType.InternalVulnerabilityResult;
		}
	}

	async Task DownloadText()
	{
		var analysisModelDTO = new AnalysisModelDTO();

		analysisModelDTO.CalculatedResults = calculatedResults;
		analysisModelDTO.RatingTables = ratingTables;
		analysisModelDTO.Results = results;
		analysisModelDTO.SectionResults = sectionResults;
		analysisModelDTO.AnalysisModel = analysisModel;

		string jsonString = JsonSerializer.Serialize(analysisModelDTO);
		await JSRuntime.InvokeAsync<object>("DownloadFile", "file.txt", jsonString);
	}

#line default
#line hidden
#nullable disable
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private IJSRuntime JSRuntime { get; set; }
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private HttpClient Http { get; set; }
    }
}
#pragma warning restore 1591
