@page "/"
@page "/prospect"
@page "/prospects"

@using FoodsharingSiegen.Shared.Helper
@inherits FsBase

<PageTitle>Neue Foodsaver - @AppSettings.Terms.Title</PageTitle>
<h2>Neue Foodsaver</h2>

<Button
    Color="Color.Primary"
    Clicked="@CreateProspectAsync"
    Visibility="@(CurrentUser.IsInGroup(UserGroup.WelcomeTeam, UserGroup.Ambassador) ? Visibility.Default : Visibility.Invisible)"
>Hinzufügen
</Button>

@{
    var filterList = ProspectList.ApplyFilter(Filter);
}

<hr/>
<ProspectFilterControl @bind-Filter="Filter" StateFilter="ProspectStateFilter.OnBoarding"></ProspectFilterControl>
<hr />
<ProspectGrid
    Prospects="filterList"
    OnDataChanged="@LoadProspects"
    StateFilter="ProspectStateFilter.OnBoarding">
</ProspectGrid>