<template>
  <div class="flex flex-col w-full">
    <div class="border-l-3 border-l-primary p-2 rounded-t-lg bg-red-200">
      <p class="text-lg font-semibold">Backup Einstellungen</p>
    </div>
    <div class="border-l-3 border-l-primary p-2 rounded-b-lg">
      <div class="w-full">
        <label for="name">Anzahl paralleler Backups</label>
        <input id="name" type="text" readonly :value="backupSettings['backup.copies']" />
      </div>
      <div class="w-full">
        <label for="name">Intervall zur Backup-Erstellung</label>
        <input id="name" type="text" readonly :value="backupSettings['backup.interval']" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useSettingStore } from "@/stores/admin/management/setting";
import { mapState } from "pinia";
import { defineComponent } from "vue";
</script>

<script lang="ts">
export default defineComponent({
  computed: {
    ...mapState(useSettingStore, ["readByTopic"]),
    backupSettings() {
      return this.readByTopic("backup");
    },
  },
});
</script>
