@using Microsoft.AspNetCore.Components
@using Radzen.Blazor
@using Radzen.Blazor.Spreadsheet
@using Radzen.Documents.Spreadsheet
@inherits SpreadsheetDialogBase

<RadzenStack Orientation="Orientation.Vertical" Gap="0.5rem">
    <RadzenStack Orientation="Orientation.Horizontal" Gap="0.5rem" AlignItems="AlignItems.Center">
        <RadzenLabel class="rz-text-subtitle2" Text=@L(nameof(RadzenStrings.Spreadsheet_ShowRowsWhere)) />
        <RadzenLabel class="rz-text-subtitle2" Text=@fieldName />
    </RadzenStack>

    <RadzenStack Orientation="Orientation.Horizontal" Gap="0.5rem" AlignItems="AlignItems.Center">
        <RadzenDropDown @bind-Value=@selectedOperator Data=@availableOperators TextProperty="Text" ValueProperty="Value"
            Placeholder=@L(nameof(RadzenStrings.Spreadsheet_SelectOperator)) InputSize="InputSize.Small" Style="width: 12rem" />
        <RadzenTextBox @bind-Value=@filterValue Placeholder=@L(nameof(RadzenStrings.Spreadsheet_EnterValue)) InputSize="InputSize.Small" Style="flex: 1" />
    </RadzenStack>

    <RadzenSelectBar @bind-Value=@logicalOperator Data=@logicalOperators TextProperty="Text" ValueProperty="Value" Size="ButtonSize.Small" />
    <RadzenStack Orientation="Orientation.Horizontal" Gap="0.5rem" AlignItems="AlignItems.Center">
        <RadzenDropDown @bind-Value=@secondOperator Data=@availableOperators TextProperty="Text"
            ValueProperty="Value" Placeholder=@L(nameof(RadzenStrings.Spreadsheet_SelectOperator)) InputSize="InputSize.Small" Style="width: 12rem" />
        <RadzenTextBox @bind-Value=@secondFilterValue Placeholder=@L(nameof(RadzenStrings.Spreadsheet_EnterValue)) InputSize="InputSize.Small" Style="flex:1" />
    </RadzenStack>

    <RadzenStack Orientation="Orientation.Horizontal" Gap="0.5rem" JustifyContent="JustifyContent.End" class="rz-spreadsheet-dialog-actions">
        <RadzenButton Text=@L(nameof(RadzenStrings.Spreadsheet_Cancel)) Click=@OnCancel ButtonStyle="ButtonStyle.Base" Variant="Variant.Outlined" />
        <RadzenButton Text=@L(nameof(RadzenStrings.Spreadsheet_OK)) Click=@OnOk ButtonStyle="ButtonStyle.Primary" Variant="Variant.Flat" />
    </RadzenStack>
</RadzenStack>