#pragma checksum "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\Pages\Judges.razor" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "41690e698b19fedb430cce4db382f210201db3b9"
// <auto-generated/>
#pragma warning disable 1591
#pragma warning disable 0414
#pragma warning disable 0649
#pragma warning disable 0169

namespace SP_MJ.Pages
{
    #line hidden
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Components;
#nullable restore
#line 2 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using Microsoft.AspNetCore.Authorization;

#line default
#line hidden
#nullable disable
#nullable restore
#line 3 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using Microsoft.AspNetCore.Components.Authorization;

#line default
#line hidden
#nullable disable
#nullable restore
#line 4 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using Microsoft.AspNetCore.Components.Forms;

#line default
#line hidden
#nullable disable
#nullable restore
#line 5 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using Microsoft.AspNetCore.Components.Routing;

#line default
#line hidden
#nullable disable
#nullable restore
#line 6 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using Microsoft.AspNetCore.Components.Web;

#line default
#line hidden
#nullable disable
#nullable restore
#line 7 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using Microsoft.JSInterop;

#line default
#line hidden
#nullable disable
#nullable restore
#line 8 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using SP_MJ;

#line default
#line hidden
#nullable disable
#nullable restore
#line 9 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using SP_MJ.Shared;

#line default
#line hidden
#nullable disable
#nullable restore
#line 10 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using MatBlazor;

#line default
#line hidden
#nullable disable
#nullable restore
#line 11 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\_Imports.razor"
using BlazorInputFile;

#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\Pages\Judges.razor"
using System.IO;

#line default
#line hidden
#nullable disable
#nullable restore
#line 4 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\Pages\Judges.razor"
using System.Net.Http;

#line default
#line hidden
#nullable disable
#nullable restore
#line 6 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\Pages\Judges.razor"
using Microsoft.AspNetCore.Identity;

#line default
#line hidden
#nullable disable
    [Microsoft.AspNetCore.Components.RouteAttribute("/judges")]
    public partial class Judges : Microsoft.AspNetCore.Components.ComponentBase
    {
        #pragma warning disable 1998
        protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
        {
        }
        #pragma warning restore 1998
#nullable restore
#line 40 "C:\Users\jayt7\Source\Repos\Senior-Project\SP-MJ\Pages\Judges.razor"
       

    bool uploadPressed;
    IFileListEntry filePath;
    string row;
    //List to store all data related to judges in files
    List<Tuple<string, string, string>> judgesList = new List<Tuple<string, string, string>>();
    int countLines;


    void GetFilePath(IFileListEntry[] files)
    {
        filePath = files.FirstOrDefault();
        System.Diagnostics.Debug.WriteLine("A file path has been entered");
    }


    async Task ProcessFile()
    {
        //check when button has been pressed
        uploadPressed = true;

        row = "";

        using (var reader = new System.IO.StreamReader(filePath.Data))
        {

            row = await reader.ReadToEndAsync();
            foreach (string line in row.Split('\n'))
            {
                if (!line.StartsWith("Email"))
                {
                    countLines++;

                    string[] tokens = line.Split(',');

                    //checking for empty lines in the document
                    if (tokens[0].StartsWith(" ") || tokens[0].StartsWith(""))
                    {
                        /* System.Diagnostics.Debug.WriteLine(tokens[0]);
                         System.Diagnostics.Debug.WriteLine(tokens[1]);
                         System.Diagnostics.Debug.WriteLine(tokens[2]);
                         */

                        judgesList.Add(new Tuple<string, string, string>(tokens[0], tokens[1], tokens[2]));
                    }
                }


            }
        }


        foreach (var element in judgesList)
        {
            System.Diagnostics.Debug.WriteLine(element);
        }
    }


#line default
#line hidden
#nullable disable
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private NavigationManager UriHelper { get; set; }
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private IJSRuntime JSrn { get; set; }
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private HttpClient Http { get; set; }
        [global::Microsoft.AspNetCore.Components.InjectAttribute] private UserManager<IdentityUser> _UserManager { get; set; }
    }
}
#pragma warning restore 1591
