{m["clients.appointments.title"]()}
{#if step === "loading"}
{:else if step === "list"}
{#if appointments.length > 0}
{#each appointments as item (item)}
{@const channel = channels?.find((it) => it.id === item.channelId)}
{#if channel}
{/if}
{@const badge = appointmentStatusToBadge(item.status)}
{#if badge}
{badge.label.toLocaleUpperCase()}
{/if}
{toDisplayDateTime(new Date(item.appointmentDate))}
{/each}
{:else}
{m["clients.appointments.empty"]()}
{/if}
{:else if step === "error"}
{m["clients.appointments.error.title"]()}
{m["clients.appointments.error.description"]()}
{/if}
{#if cancelling}
{@const channel = channels?.find((it) => it.id === cancelling?.channelId)}