@inherits FsBase
@using FoodsharingSiegen.Contracts.Enums

<div class="d-grid gap-2">
    @if (!AppSettings.DisableStepIn && new[] { ProspectStateFilter.All, ProspectStateFilter.OnBoarding, ProspectStateFilter.Completed }.Contains(StateFilter))
    {
        <div style="margin-left: 1rem;">
            <Switch TValue="bool" Checked="ModalFilter.WithoutStepInBriefing" CheckedChanged="(v) => { ModalFilter.WithoutStepInBriefing = v; StateHasChanged(); }" Color="Color.Primary">
                Ohne @AppSettings.Terms.StepInName
            </Switch>
        </div>
    }

    @if (new[] { ProspectStateFilter.All, ProspectStateFilter.Verification, ProspectStateFilter.Completed }.Contains(StateFilter))
    {
        <div style="margin-left: 1rem;">
            <Switch TValue="bool" Checked="ModalFilter.WithoutIdCheck" CheckedChanged="(v) => { ModalFilter.WithoutIdCheck = v; StateHasChanged(); }" Color="Color.Primary">
                Perso noch nicht geprüft
            </Switch>
        </div>
    }

    @if(new[] { ProspectStateFilter.OnBoarding, ProspectStateFilter.Verification }.Contains(StateFilter))
    {
        <div style="margin-left: 1rem;">
            <Switch TValue="bool" Checked="ModalFilter.IdCheckPossible" CheckedChanged="(v) => { ModalFilter.IdCheckPossible = v; StateHasChanged(); }" Color="Color.Primary">
                Perso-Prüfung möglich
            </Switch>
        </div>
    }

    @if (new[] { ProspectStateFilter.All, ProspectStateFilter.OnBoarding, ProspectStateFilter.Verification }.Contains(StateFilter))
    {
        <div style="margin-left: 1rem;">
            <Switch TValue="bool" Checked="ModalFilter.RecentActivity" CheckedChanged="(v) => { ModalFilter.RecentActivity = v; StateHasChanged(); }" Color="Color.Primary">
                Kürzlich geändert (&lt; 6 Monate)
            </Switch>
        </div>
        <div style="margin-left: 1rem;">
            <Switch TValue="bool" Checked="ModalFilter.NoActivity" CheckedChanged="(v) => { ModalFilter.NoActivity = v; StateHasChanged(); }" Color="Color.Primary">
                Lange keine Aktivität (&gt; 6 Monate)
            </Switch>
        </div>
    }

    @if (StateFilter == ProspectStateFilter.All)
    {
        <div style="margin-left: 1rem;">
            <Switch TValue="bool" Checked="ModalFilter.DeletedOnly" CheckedChanged="(v) => { ModalFilter.DeletedOnly = v; StateHasChanged(); }" Color="Color.Primary">
                Gelöschte
            </Switch>
        </div>
    }

    <div class="d-flex justify-content-end mt-3">
        <Button Color="Color.Primary" Clicked="ApplyAsync" Block="true">Anwenden</Button>
    </div>
</div>
