import EmptyHeader from '@/app/_global/components/blocks/EmptyHeader'
import { LOGIN_URL, LOGOUT_URL, RESET_PASSWORD_URL } from '@/config/defaults'

export default [
  {
    path: '/',
    component: () => {
      return import('@/elements/templates/screens/HeaderFlex')
    },
    name: 'LoginParent',
    redirect: LOGIN_URL,
    meta: {
      menuItem: false,
      template: { header: EmptyHeader, containerClass: 'landing' },
      icon: 'beenhere',
      screen: 'login-screen',
    },
    children: [
      {
        path: LOGIN_URL,
        component: () => import('./components/LoginForm'),
        name: 'Login',
        meta: {
          title: 'general.dashboard.text',
        },
      },
      {
        path: LOGIN_URL + '/forgot',
        component: () => import('./components/ForgotPassword'),
        name: 'ForgotPassword',
        meta: {
          title: 'general.dashboard.text',
        },
      },
      {
        path: LOGIN_URL + '/contact',
        component: () => import('./components/PreferredContact'),
        name: 'PreferredContact',
        meta: {
          title: 'general.dashboard.text',
        },
      },
      {
        path: LOGIN_URL + '/change-password',
        component: () => import('./components/ChangePassword'),
        name: 'ChangePassword',
        meta: {
          title: 'general.dashboard.text',
        },
      },
      {
        path: LOGIN_URL + '/otp-reset',
        component: () => import('./components/OTPResetPassword'),
        name: 'OTPResetPassword',
        meta: {
          title: 'general.dashboard.text',
        },
      },
      {
        path: LOGOUT_URL,
        component: () => import('./components/Logout'),
        name: 'Logout',
        meta: {
          title: 'general.dashboard.text',
          displayName: 'Eshop.Menu.Logout',
          priority: 5,
        },
      },
      {
        path: RESET_PASSWORD_URL + '/:userId?',
        component: () => import('./components/OTPResetPassword'),
        name: 'OTPResetPasswordUser',
        props: true,
        meta: {
          title: 'general.dashboard.text',
        },
      },
    ],
  },
]
