<!DOCTYPE html>
<html lang="en" data-bs-theme="auto">

<head>
  <!-- TEMPLATE_HEADER - Used by Every UI Page -->
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Apollo</title>
<link rel="icon" type="image/x-icon" href="./images/apollo.ico">
<link href="./assets/css/apollo.css" rel="stylesheet" />

    <style>
      .config-page {
        padding: 1em;
        border: 1px solid #dee2e6;
        border-top: none;
      }

      .pre-wrap {
        white-space: pre-wrap;
      }

      .buttons {
        padding: 1em 0;
      }
    </style>
  <script type="module" crossorigin src="./assets/config-CqybENbi.js"></script>
  <link rel="modulepreload" crossorigin href="./assets/init-Ck7wRxmZ.js">
  <link rel="modulepreload" crossorigin href="./assets/theme-BfDtj5yE.js">
  <link rel="modulepreload" crossorigin href="./assets/_plugin-vue_export-helper-DlAUqK2U.js">
  <link rel="modulepreload" crossorigin href="./assets/Navbar-CshJBn-L.js">
  <link rel="modulepreload" crossorigin href="./assets/Checkbox-Cnqtybr8.js">
  <link rel="stylesheet" crossorigin href="./assets/init-D_k9xtOw.css">
  <link rel="stylesheet" crossorigin href="./assets/Navbar-dej49bs7.css">
  <link rel="stylesheet" crossorigin href="./assets/config-B_QFm8FU.css">
</head>

<body id="app" v-cloak>
  <Navbar></Navbar>
  <div class="container">
    <h1 class="my-4">{{ $t('config.configuration') }}</h1>
    <div class="form" v-if="config">
      <!-- Header -->
      <ul class="nav nav-tabs">
        <li class="nav-item" v-for="tab in tabs" :key="tab.id">
          <a class="nav-link" :class="{'active': tab.id === currentTab}" href="#"
            @click="currentTab = tab.id">{{tab.name}}</a>
        </li>
      </ul>

      <!-- General Tab -->
      <general
        v-if="currentTab === 'general'"
        :config="config"
        :global-prep-cmd="global_prep_cmd"
        :global-state-cmd="global_state_cmd"
        :server-cmd="server_cmd"
        :platform="platform">
      </general>

      <!-- Input Tab -->
      <inputs
        v-if="currentTab === 'input'"
        :config="config"
        :platform="platform">
      </inputs>

      <!-- Audio/Video Tab -->
      <audio-video
        v-if="currentTab === 'av'"
        :config="config"
        :platform="platform"
        :vdisplay="vdisplayStatus"
      >
      </audio-video>

      <!-- Network Tab -->
      <network
        v-if="currentTab === 'network'"
        :config="config"
        :platform="platform">
      </network>

      <!-- Files Tab -->
      <files
        v-if="currentTab === 'files'"
        :config="config"
        :platform="platform">
      </files>

      <!-- Advanced Tab -->
      <advanced
        v-if="currentTab === 'advanced'"
        :config="config"
        :platform="platform">
      </advanced>

      <container-encoders
        :current-tab="currentTab"
        :config="config"
        :platform="platform">
      </container-encoders>
    </div>

    <!-- Save and Apply buttons -->
    <div class="alert alert-success my-4" v-if="saved && !restarted">
      <b>{{ $t('_common.success') }}</b> {{ $t('config.apply_note') }}
    </div>
    <div class="alert alert-success my-4" v-if="restarted">
      <b>{{ $t('_common.success') }}</b> {{ $t('config.restart_note') }}
    </div>
    <div class="mb-3 buttons">
      <button class="btn btn-primary" @click="save">{{ $t('_common.save') }}</button>
      <button class="btn btn-success mx-2" @click="apply" v-if="saved && !restarted">{{ $t('_common.apply') }}</button>
    </div>
  </div>
</body>


