{#if !publicMode} {/if}

{localized(config?.baseTranslations?.installationGuideHeader, t("wa_install_title", {}, "Install"))}

{t("wa_install_subtitle", {}, "Choose your platform and app.")}

{#if guideState?.enabled && config && platforms.length}
{#if selectedPlatform} {@const SelectedFallbackIcon = platformFallbackIcon(selectedPlatform.key)} {#if iconSvg(selectedPlatform.svgIconKey)} {:else} {/if} {/if} {selectedPlatformLabel} {#each platforms as platform} {@const PlatformFallbackIcon = platformFallbackIcon(platform.key)} {#if iconSvg(platform.svgIconKey)} {:else} {/if} {localized(platform.displayName, platform.key)} {/each}
{/if}
{#if guideState?.loading && !guideState?.loaded}

{t("wa_install_loading", {}, "Loading instructions...")}

{:else if !guideState?.enabled || !config || !platforms.length}

{t("wa_install_unavailable", {}, "Instructions are unavailable.")}

{:else} {#key selectedPlatformKey} {#if apps.length > 1}
{t("wa_install_app", {}, "App")}
{#each apps as app, index (`${selectedPlatformKey}:${app.name}:${index}`)} {/each}
{/if} {/key} {#if selectedApp} {#key `${selectedPlatformKey}:${selectedAppIndex}:${selectedApp.name}`}
{#each selectedApp.blocks as block, blockIndex (`${selectedPlatformKey}:${selectedApp.name}:${blockIndex}:${localized(block.title)}`)}

{localized(block.title)}

{localized(block.description)}

{#if block.buttons?.length}
{#each block.buttons as button} {/each}
{/if}
{/each}
{/key} {#if finalSubscriptionLink && !publicMode}

{t("wa_install_subscription_link", {}, "Subscription link")}

{t("wa_install_subscription_link_hint", {}, "Scan the QR code or copy the link.")}

{#if qrDataUrl}
{t("wa_install_qr_alt",
{/if}
{/if} {/if} {/if}