<template>
  <Page :fetched-data="fetchedData">
    <template #extra-fields>
      <section class="main-section">
        <Title tag="h4">
          {{ $_tr('notice.title') }}
        </Title>

        <InputText
          :label="$_tr('notice.welcomeNoticeTitle.label')"
          :default-value="fetchedData.loginpage.welcome_notice_title"
          :form-id="formId"
          model-name="welcome_notice_title"
          class="input-advanced-settings"
        />

        <InputTextarea
          :label="$_tr('notice.welcomeNoticeContent.label')"
          :default-value="fetchedData.loginpage.welcome_notice_content"
          :form-id="formId"
          model-name="welcome_notice_content"
          class="input-advanced-settings"
        />

        <InputText
          :label="$_tr('notice.welcomeNoticeLink.label')"
          :default-value="fetchedData.loginpage.welcome_notice_link"
          :form-id="formId"
          model-name="welcome_notice_link"
          class="input-advanced-settings"
        />
      </section>
    </template>
  </Page>
</template>

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

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

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

export default {
  name: 'AdminAdvancedSettingsLoginPage',
  $_i18nRootPath:
    'administration.PAGES.ADVANCED_SETTINGS.adminAdvancedSettingsLoginPage',
  components: {
    Title,
    Page,
    InputText,
    InputTextarea
  },
  props: {
    fetchedData: {
      type: Object
    }
  },
  data() {
    return {
      formId: 'advanced-settings-login'
    }
  }
}
</script>
