<template>
  <Page :fetched-data="fetchedData">
    <template #extra-fields>
      <section class="main-section">
        <div
          v-for="(lang, index) in availableLangs"
          :key="`hp-slug-wall-${index}`"
          class="mt-xxl"
        >
          <InputText
            :label="$_tc('hpSlugWall.label', [lang])"
            :default-value="fetchedData.homepage[`hp_${lang}_slug_wall`]"
            :model-name="`hp_${lang}_slug_wall`"
            form-id="advanced-settings-homepage"
          />
        </div>
      </section>
    </template>
  </Page>
</template>

<script>
import { Title, BaseText } from 'inside-collection/atoms'

import Page from '@inside-administration/components/pages/advanced-settings/AdminAdvancedSettingsHomePage'

import InputText from '@inside-forms/displays/sub-components/fields/InputText'

export default {
  name: 'AdminAdvancedSettingsHomePage',
  $_i18nRootPath:
    'administration.PAGES.ADVANCED_SETTINGS.adminAdvancedSettingsHomePage',
  components: {
    Title,
    BaseText,
    Page,
    InputText
  },
  props: {
    fetchedData: {
      type: Object
    }
  },
  computed: {
    availableLangs() {
      return this.$store.getters.getAvailablesLangs
    }
  }
}
</script>
