@page "/tickets/add"

@* <AuthorizeView Context="authContext" Roles="admin">
    <Authorized > *@
        <h3>Add Ticket</h3>

        <EditForm Model="@ticketModel" OnValidSubmit="@HandleValidSubmit">
            <DataAnnotationsValidator />
            <ValidationSummary />
    
            <p>
                <label for="username">
                    Username:
                    <InputText id="username" @bind-Value="ticketModel.Username" />
                </label>
            </p>
            <p>
                <label for="first-name">
                    First name:
                    <InputText id="first-name" @bind-Value="ticketModel.Nom" />
                </label>
            </p>
            <p>
                <label for="last-name">
                    Last name:
                    <InputText id="last-name" @bind-Value="ticketModel.Prenom" />
                </label>
            </p>
            <p>
                <label for="oui">
                    Context:
                    <InputText id="oui" @bind-Value="ticketModel.Contexte" />
                </label>
            </p>
            <p>
                <label for="description">
                    Description:
                    <InputText id="description" @bind-Value="ticketModel.Description" />
                </label>
            </p>

            <p>
                <label for="urgence">
                    Urgence:
                    <InputCheckbox id="urgence" @bind-Value="ticketModel.Urgence" />
                </label>
            </p>

            <button type="submit">Submit</button>
        </EditForm>

@*     </Authorized>
    <Authorizing>
        <h1>Loading ...</h1>
    </Authorizing>
    <NotAuthorized>
        <h1>Authentication Failure!</h1>
        <p>You're not signed in.</p>
    </NotAuthorized>
</AuthorizeView> *@