{edit ? $i18n.t('Edit Machine') : $i18n.t('Add Machine')}

{#if error}{/if} {#if showLocalOption || localMachine}
{$i18n.t('Type')}
{/if}
{#if !installing && !managed}
{/if}
{#if !installingLocal && !localMachine}
{#if sshMachine} {:else} { serverType = null; resetSSH(); }} /> {/if}
{#if !installingSSH} {/if}
{/if} {#if installingSSH} {#if sshPhase === 'form'}
{#if signIn === 'password'} {:else if signIn === 'key'}
{:else}

{$i18n.t('You will get a command to run on the machine.')}

{/if}
{#if signIn !== 'manual'}

{$i18n.t('Used once to authorize Open WebUI, never stored.')}

{/if}
{:else if sshPhase === 'fingerprint' && hostKey}

{$i18n.t('Confirm this is the machine you expect. Its host key fingerprint is:')}

{hostKey.fingerprint}

{:else if sshPhase === 'authorize' && keypair}

{signIn === 'manual' ? $i18n.t('Run this on the machine as {{user}}, then continue:', { user: sshTarget?.username ?? '' }) : $i18n.t('Or run this on the machine as {{user}}, then continue:', { user: sshTarget?.username ?? '' })}

{authorizeCommand(
							keypair.public_key
						)}
{/if} {:else if managed}
{$i18n.t('Status')}
{managed.status === 'error' ? $i18n.t('Error') : running || managed.status === 'installing' ? $i18n.t('Installing') : $i18n.t('Ready')} {$i18n.t('Open Terminal {{version}}', { version: managed.version ?? '' })}
{#if busy}{/if}
{#if managed.status === 'error' && managed.error}

{managed.error}

{/if} {#if logs !== null}
{logs ||
							$i18n.t('No logs yet.')}
{/if}
{:else if !installingLocal}
{#if auth_type === 'session'}

{$i18n.t('Forwards system user session credentials to authenticate')}

{:else if auth_type === 'system_oauth'}

{$i18n.t('Forwards system user OAuth access token to authenticate')}

{:else if auth_type === 'none'}

{$i18n.t('No authentication')}

{/if}
{/if} {#if (installing && sshPhase === 'form') || managed} {#if installingSSH || sshMachine}
{#if managed} {/if}
{#if installingPackages}
{$i18n.t('Installing packages')}
{:else if packagesResult || managed?.warning}
{packagesResult?.text ??
							managed?.warning}
{/if} {/if}
{#if installingLocal || localMachine}

{$i18n.t( 'Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.' )}

{/if} {/if} {#if !installingPackages && (sshPhase === 'installing' || running || steps.length)}
    {#each installSteps as step} {@const index = steps.indexOf(step)} {@const current = running && index === steps.length - 1}
  1. {#if current}{:else if index >= 0}{/if} {stepLabel(step)}
  2. {/each}
{/if} {#if serverType === 'orchestrator'}

{$i18n.t('Create and configure machines from the machine selector.')}

{/if}

{$i18n.t('Include the current directory in tool instructions.')}

{#if userShellTools === 'auto'} {$i18n.t('Include tools only while your shell is connected.')} {:else} {$i18n.t('Keep tools listed even while your shell is closed.')} {/if}

{$i18n.t('Forward cookies from your Open WebUI request to this server.')}

{#if !installing && !managed}

{$i18n.t('WebUI will make requests to "{{url}}"', { url: path.includes('://') ? path : `${url}${path.startsWith('/') ? '' : '/'}${path}` })}

{/if}
{}} />
{#if edit} {:else if installingSSH && (sshPhase === 'fingerprint' || sshPhase === 'authorize')} {/if}
remove()} /> remove(true)} />