using Microsoft.AspNetCore.Components;

namespace BackOffice.Common.BaseComponents;

public partial class BasePageComponent
{
    [Parameter] public RenderFragment? Filters { get; set; }
    [Parameter] public RenderFragment Content { get; set; } = default!;
    [Parameter] public bool IsFiltered { get; set; }
    [Parameter] public EventCallback OnSubmitClick { get; set; }
    [Parameter] public EventCallback OnClearFilterClick { get; set; }

    /// <summary>Whether the filter panel is expanded.</summary>
    private bool _filterOpen;

    private void ToggleFilterPanel() => _filterOpen = !_filterOpen;
}
