<template>
  <login-form-template v-bind="formTemplateProps">
    <change-password-template :force-logout="false" :redirect="{ name: 'DashboardHome' }" />
  </login-form-template>
</template>
<script>
import LoginFormTemplate from './templates/FormTemplate'
import ChangePasswordTemplate from '@/app/_global/components/elements/ChangePassword'

export default {
  name: 'ChangePassword',
  components: {
    LoginFormTemplate,
    ChangePasswordTemplate,
  },
  props: {
    namespace: { type: String, default: 'eshop' },
  },
  data() {
    return {
      isEvo: this.$appSettings.evo.enable,
    }
  },
  computed: {
    formTemplateProps() {
      let props = {
        showBack: false,
        namespace: this.namespace,
        showLogo: true,
        title: this.$t('Login.LoginForm.ResetPassword.Title'),
        text: this.$t('Login.LoginForm.ResetPassword.Note'),
        'form-class': "['justify-content-start']",
      }

      if (this.isEvo) {
        props['showLogo'] = false
        props['namespace'] = 'evo'
      }

      return props
    },
  },
}
</script>
