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

@inherits FsBase

<PageTitle>Aktuelle Einarbeitungen</PageTitle>
<h2>Aktuelle Einarbeitungen</h2>

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


@if (ProspectList?.Any() == true)
{
    <hr />
    <h5>@ProspectList.Count Einträge</h5>
    <div class="row m-0">
        <Repeater Items="@ProspectList">
            <ProspectContainer Prospect="context" InteractionModal="InteractionModal" ProspectModal="ProspectModal" RemoveInteraction="RemoveInteraction"></ProspectContainer>
        </Repeater>
    </div>
}

<AddProspectModal @ref="ProspectModal" OnAdd="OnAddProspect" OnUpdate="OnUpdateProspect"></AddProspectModal>
<AddInteractionModal @ref="InteractionModal" OnAdd="OnAddInteraction" Users="Users"></AddInteractionModal>