import { NamedRoutes } from '@/core';
import { Routes } from '@angular/router';
import config from 'src/config';

export type TPosConfigRouteNames = 'config';
const baseRoute = `${config.isPosApplication ? '' : '/pos'}/config`;

export const posConfigNamedRoutes: NamedRoutes<TPosConfigRouteNames> = {
  config: {
    path: 'config',
    loadComponent: () => import('../../views/root.component').then((m) => m.PosConfigPageComponent),
    meta: {
      title: 'تنظیمات',
      pagePath: () => baseRoute,
    },
  },
};

export const POS_CONFIG_ROUTES: Routes = [posConfigNamedRoutes.config];
