{#if modal_open}
{ modal_open = false; }} >
{$_("add-donation")}
{ type = "distance"; }} type="button" id="bar-with-underline-item-1" class:donation_active_tab={type === "distance"} class:donation_inactive_tab={type !== "distance"} aria-selected={type === "distance"} role="tab" > {$_("spende_pro_km")}
{ type = "fixed"; }} type="button" id="bar-with-underline-item-2" class:donation_active_tab={type === "fixed"} class:donation_inactive_tab={type !== "fixed"} aria-selected={type === "fixed"} role="tab" > {$_("festbetrag")}
{ type = "anonymous"; }} type="button" id="bar-with-underline-item-3" class:donation_active_tab={type === "anonymous"} class:donation_inactive_tab={type !== "anonymous"} aria-selected={type === "anonymous"} role="tab" > {$_("anonyme_spende")}
{#if type === "anonymous"}
{$_("donation-amount")}
€
{#if !is_amount_valid}
{$_("donation-amount-must-be-greater-that-0-00eur")}
{/if}
{:else}
{$_("donor")}
filterDonors(label, filterText, option)} items={donors} showChevron={true} placeholder={$_("search-for-donor-name-or-id")} noOptionsMessage={$_("no-donors-found")} on:select={(selectedValue) => (donor = selectedValue.detail.value.id)} on:clear={() => (donors = null)} />
{#if type === "distance"}
{$_("runner")}
filterDonors(label, filterText, option)} items={runners} showChevron={true} placeholder={$_("search-for-runner-by-name-or-id")} noOptionsMessage={$_("no-runners-found")} on:select={(selectedValue) => (runner = selectedValue.detail.value.id)} on:clear={() => (runner = null)} />
{/if}
{#if type === "fixed"} {$_("donation-amount")} {:else}{$_("amount-per-kilometer")}{/if}
€
{#if !is_amount_valid}
{$_("donation-amount-must-be-greater-that-0-00eur")}
{/if}
{/if} {#if type === "fixed"}
{$_("already-paid")}
{/if}
{$_("create")}
{ modal_open = false; }} type="button" class="w-full justify-center rounded-md border border-neutral-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-neutral-900 hover:bg-neutral-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block" > {$_("cancel")}
{/if}