import type { RouteRecordRaw } from 'vue-router'

export const mobileRoutes: RouteRecordRaw[] = [
  {
    path: '/m',
    name: 'mobile-home',
    component: () => import('@/features/listings/views/MobileHomeView.vue'),
    meta: { layout: 'blank' },
  },
  {
    path: '/m/listings',
    name: 'mobile-listings',
    component: () => import('@/features/listings/views/MobileHomeView.vue'),
    meta: { layout: 'blank' },
  },
  {
    path: '/m/listings/:id',
    name: 'mobile-listing-detail',
    component: () => import('@/features/listings/views/MobileListingDetailView.vue'),
    meta: { layout: 'blank' },
  },
  {
    path: '/m/login',
    name: 'mobile-login',
    component: () => import('@/features/auth/views/MobileLoginView.vue'),
    meta: { layout: 'blank' },
  },
  {
    path: '/m/register',
    name: 'mobile-register',
    component: () => import('@/features/auth/views/MobileRegisterView.vue'),
    meta: { layout: 'blank' },
  },
  {
    path: '/m/messages',
    name: 'mobile-messages',
    component: () => import('@/features/chats/views/MobileMessagesView.vue'),
    meta: { layout: 'blank', requiresAuth: true },
  },
  {
    path: '/m/chats/:id',
    name: 'mobile-chat',
    component: () => import('@/features/chats/views/MobileChatView.vue'),
    meta: { layout: 'blank', requiresAuth: true },
  },
  {
    path: '/m/realname',
    name: 'mobile-realname',
    component: () => import('@/features/auth/views/MobileRealnameView.vue'),
    meta: { layout: 'blank', requiresAuth: true },
  },
  {
    path: '/m/profile',
    name: 'mobile-profile',
    component: () => import('@/features/auth/views/MobileProfileView.vue'),
    meta: { layout: 'blank', requiresAuth: true },
  },
  {
    path: '/m/orders',
    name: 'mobile-orders',
    component: () => import('@/features/orders/views/MobileOrdersView.vue'),
    meta: { layout: 'blank', requiresAuth: true },
  },
  {
    path: '/m/orders/:id',
    name: 'mobile-order-detail',
    component: () => import('@/features/orders/views/MobileOrderDetailView.vue'),
    meta: { layout: 'blank', requiresAuth: true },
  },
  {
    path: '/m/seller/listings/create',
    name: 'mobile-seller-listing-create',
    component: () => import('@/features/seller/views/MobileSellerListingCreateView.vue'),
    meta: { layout: 'blank', requiresAuth: true, requiresRealname: true },
  },
  {
    path: '/m/seller/listings',
    name: 'mobile-seller-listings',
    component: () => import('@/features/seller/views/SellerListingsView.vue'),
    meta: { layout: 'blank', requiresAuth: true },
  },
]
