#pragma checksum "C:\Users\tmilchev\Desktop\1\1294\Sample\Views\Home\Index.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b3e4cb32c7eb0b8019ec36c9197304a01a56c45b"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Views_Home_Index), @"mvc.1.0.view", @"/Views/Home/Index.cshtml")]
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/Views/Home/Index.cshtml", typeof(AspNetCore.Views_Home_Index))]
namespace AspNetCore
{
    #line hidden
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Mvc;
    using Microsoft.AspNetCore.Mvc.Rendering;
    using Microsoft.AspNetCore.Mvc.ViewFeatures;
#line 1 "C:\Users\tmilchev\Desktop\1\1294\Sample\Views\_ViewImports.cshtml"
using Sample;

#line default
#line hidden
#line 2 "C:\Users\tmilchev\Desktop\1\1294\Sample\Views\_ViewImports.cshtml"
using Kendo.Mvc.UI;

#line default
#line hidden
    [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"b3e4cb32c7eb0b8019ec36c9197304a01a56c45b", @"/Views/Home/Index.cshtml")]
    [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"927fc53a53c657c8cf2f5c30d8c2e1edd19f9d0d", @"/Views/_ViewImports.cshtml")]
    public class Views_Home_Index : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
    {
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 1 "C:\Users\tmilchev\Desktop\1\1294\Sample\Views\Home\Index.cshtml"
  
	ViewData["Title"] = "Home Page";

#line default
#line hidden
            BeginContext(42, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            BeginContext(46, 2005, false);
#line 5 "C:\Users\tmilchev\Desktop\1\1294\Sample\Views\Home\Index.cshtml"
Write(Html.Kendo().Scheduler<Sample.Models.MeetingViewModel>()
    .Name("scheduler")
    .Date(new DateTime(2021, 11, 8))
    .StartTime(new DateTime(2021, 11, 13))
    .Height(600)
    .EventTemplateId("event-template")
    .Views(views => {
        views.DayView();
        views.WeekView(weekView => weekView.Selected(true));
        views.MonthView();
        views.AgendaView();
    })
    .Editable(editable => {
        editable.TemplateName("CustomEditorTemplate");
    })
    .Timezone("Etc/UTC")
    .Resources(resource => {
             resource.Add(m => m.RoomID)
                 .Title("Room")
                 .DataTextField("Text")
                 .DataValueField("Value")
                 .DataColorField("Color")
                 .BindTo(new[] { 
                    new { Text = "Meeting Room 101", Value = 1, Color = "#6eb3fa" },
                    new { Text = "Meeting Room 201", Value = 2, Color = "#f58a8a" } 
                });
             resource.Add(m => m.Attendees)
                 .Title("Attendees")
                 .Multiple(true)
                 .DataTextField("Text")
                 .DataValueField("Value")
                 .DataColorField("Color")
                 .BindTo(new[] { 
                    new { Text = "Alex", Value = 1, Color = "#f8a398" },
                    new { Text = "Bob", Value = 2, Color = "#51a0ed" },
                    new { Text = "Charlie", Value = 3, Color = "#56ca85" } 
                });
         })
    .DataSource(d => d
        .Batch(true)
        .Model(m => {
            m.Id(f => f.MeetingID);
            m.Field(f => f.Title).DefaultValue("No title");
            m.RecurrenceId(f => f.RecurrenceID);
        })
        .Events(e => e.Error("error_handler"))
        .Read("Meetings_Read", "Home")
        .Create("Meetings_Create", "Home")
        .Destroy("Meetings_Destroy", "Home")
        .Update("Meetings_Update", "Home")
    )
	.Events(e => e.Edit("onEdit"))
);

#line default
#line hidden
            EndContext();
            BeginContext(2052, 1091, true);
            WriteLiteral(@"


<script id=""event-template"" type=""text/x-kendo-template"">
    <div class='event-template'>
        <span style=""background-color: lightgreen"">#: title #</span>
    </div>
</script>

<script type=""text/javascript"">
	function onEdit(e) {
		var start = e.event.start;
		var recurrenceEditor = e.container.find('#RecurrenceRule').data('kendoRecurrenceEditor');
		recurrenceEditor.setOptions({
			start: start
		});
	}

    function error_handler(e) {
        if (e.errors) {
            var message = ""Errors:\n"";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function () {
                        message += this + ""\n"";
                    });
                }
            });
            alert(message);
            var scheduler = $(""#scheduler"").data(""kendoScheduler"");
            scheduler.one(""dataBinding"", function (e) {
                //prevent saving if server error is thrown
             ");
            WriteLiteral("   e.preventDefault();\r\n            })\r\n        }\r\n    }\r\n</script>");
            EndContext();
        }
        #pragma warning restore 1998
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
    }
}
#pragma warning restore 1591
