@inherits ComponentBase

<BaseContainer Title="@Title" Breadcrumbs="@_breadcrumbs" LoadData="LoadDataAsync" DisableReload>
    <Content>
        @if (_model is not null)
        {
            <MudGrid>
                <MudItem xs="12" sm="12" md="12" lg="12">
                    <MudTextField T="string" Label="Query" Variant="Variant.Outlined" @bind-Text="_model.ConsoleQuery.Query" Lines="20" />
                </MudItem>

                <MudItem xs="12" sm="12" md="12" lg="12">
                    @if (_model.ConsoleQuery.HadErrors is false)
                    {
                        <MudTextField T="string" Label="Data" Variant="Variant.Outlined" @bind-Text="_model.ConsoleQuery.Data" Lines="20" />
                    }
                    else
                    {
                        <MudTextField T="string" Label="Errors" Variant="Variant.Outlined" @bind-Text="_model.ConsoleQuery.Errors" Lines="20" />
                    }
                </MudItem>

                <MudItem xs="12" md="12" lg="12" Class="d-flex justify-center">
                    <MudButton OnClick="SubmitAsync" Variant="Variant.Filled" Color="Color.Surface" Size="Size.Large" Style="width: 100%;">Query</MudButton>
                </MudItem>
            </MudGrid>
        }
    </Content>
</BaseContainer>