import React from 'react';
import { lazy } from 'react';
const CommonMaster = lazy(
  () => import('./Pages/CommonMaster/CommonMaster.jsx')
);
const ConfigType = lazy(() => import('./Pages/ConfigType/ConfigTypeForm.jsx'));
const AdminTax = lazy(() => import('./Pages/AdminTax/AdminTaxForm.jsx'));
const ProductForm = lazy(() => import('./Pages/Product/ProductForm.jsx'));
const Sport_ProductForm = lazy(
  () => import('./Pages/Product/SportsMaster.jsx')
);
const ShiftMasterList = lazy(
  () => import('./Pages/ShiftMaster/ShiftMasterList.jsx')
);
const ShiftMasterForm = lazy(
  () => import('./Pages/ShiftMaster/ShiftMasterForm.jsx')
);
const EmployeeMasterList = lazy(
  () => import('./Pages/EmpMaster/EmpMasterList.jsx')
);
const EmployeeMasterForm = lazy(
  () => import('./Pages/EmpMaster/EmpMasterForm.jsx')
);

const SupplierMasterList = lazy(
  () => import('./Pages/SupplierMaster/SupplierMasterList.jsx')
);
const SupplierMasterForm = lazy(
  () => import('./Pages/SupplierMaster/SupplierMasterForm.jsx')
);

const ComponentMasterForm = lazy(
  () => import('./Pages/UiComponentPage/ComponentForm.jsx')
);
const ComponentMasterList = lazy(
  () => import('./Pages/UiComponentPage/ComponentList.jsx')
);

const CustomerForm = lazy(
  () => import('./Pages/CustomerMaster/CustMasterForm.jsx')
);
const CustomerMasterList = lazy(
  () => import('./Pages/CustomerMaster/CustMasterList.jsx')
);

const DateWiseReport = lazy(
  () => import('./Pages/Reports/DateWiseReport/DateWiseReport.jsx')
);

const ItemWiseReport = lazy(
  () => import('./Pages/Reports/ItemWiseReport/ItemWiseReport.jsx')
);

const Reprint = lazy(
  () =>
    import('./Pages/BookingScreen/Components/OtherConponents/Reprint/BSReprint.jsx')
);

const BookingSelectionPage = lazy(
  () => import('./Pages/BookingScreen/Components/MainPage/MainPage.jsx')
);

const PrintSelectionPage = lazy(
  () => import('./Pages/BookingScreen/Components/PrintMainPage/MainPage.jsx')
);
const KioskMainPage = lazy(
  () => import('./Pages/BookingScreen/Components/Kiosk/KioskMainPage.jsx')
);

const BookingPage = lazy(() => import('./Pages/BookingScreen/BookingPage.jsx'));

const StockForm = lazy(() => import('./Pages/StockMaster/StockForm.jsx'));

const StockList = lazy(() => import('./Pages/StockMaster/StockList.jsx'));

const DiningMasterList = lazy(() => import('./Pages/Dining/DiningList.jsx'));

const DiningMasterForm = lazy(() => import('./Pages/Dining/DiningForm.jsx'));

const TableBooking = lazy(
  () => import('./Pages/Tablebooking/TableBooking.jsx')
);

const ComboMaster = lazy(() => import('./Pages/ComboPack/ComboMaster.jsx'));

const ComboList = lazy(() => import('./Pages/ComboPack/ComboMasterlist.jsx'));
const EmpAccessForm = lazy(() => import('./Pages/EmpAccess/EmpAccessForm.jsx'));
const EmpAccessList = lazy(() => import('./Pages/EmpAccess/EmpAccessList.jsx'));

const EmpScreenAccessList = lazy(
  () => import('./Pages/EmpScreenAccess/EmpScreenAccessList.jsx')
);
const EmpScreenRightsAccess = lazy(
  () => import('./Pages/EmpScreenAccess/EmpScreenRightsAccess.jsx')
);

const PreferenceList = lazy(
  () => import('./Pages/Preference/PreferenceList.jsx')
);

const PaymentOptions = lazy(
  () => import('./Pages/Payment/PaymentOptions/PaymentOptions.jsx')
);
const PaymentDetails = lazy(
  () => import('./Pages/Payment/PaymentDetails/PaymentDetailsForm.jsx')
);
const PaymentDetailsList = lazy(
  () => import('./Pages/Payment/PaymentDetails/PaymentDetailsList.jsx')
);
const PaymentReceivedRetail = lazy(
  () =>
    import('./Pages/Payment/PaymentReceivedRetail/PaymentReceivedRetail.jsx')
);

const ExtraChargesList = lazy(
  () => import('./Pages/ExtraCharges/ExtraChargesList.jsx')
);

const BranchLogin = lazy(() => import('./Pages/BranchLogin/BranchLogin.jsx'));
const BackToBranchLogin = lazy(
  () => import('./Pages/BranchLogin/BackToBranchLogin.jsx')
);
const Logout = lazy(() => import('./Pages/Logout.jsx'));

const BacktoLogin = lazy(() => import('./Pages/BranchLogin/BacktoLogin.jsx'));

const StockPriceUpdate = lazy(
  () => import('./Pages/StockPriceUpdate/StockPriceUpdate.jsx')
);

const ProductCatalogueList = lazy(
  () => import('./Pages/ProductCatlogue/ProductcatlogueList.jsx')
);

const KOT = lazy(() => import('./Pages/Reports/KOT/kot.jsx'));

const CustomerKOTDisplay = lazy(
  () => import('./Pages/Reports/KOT/CustomerKOTDisplay.jsx')
);

const RedirectApps = lazy(() => import('./Pages/RedirectApps.jsx'));

const WSTransaction = lazy(
  () => import('./Pages/WholeSaleTransaction/WSSalesTransaction.jsx')
);

const LedgerReport = lazy(
  () => import('./Pages/Reports/LedgerReport/LedgerReport.jsx')
);
const PaymentDetailsPage = lazy(
  () =>
    import('./Pages/BookingScreen/Components/BookingFunctionality/PaymentDetailsPage.jsx')
);

const CreditCustomerPrint = lazy(
  () =>
    import('./Pages/BookingScreen/Components/BookingFunctionality/CreditDownloadpage.jsx')
);

const Cancellation = lazy(
  () => import('./Pages/CancelReschedule/Cancellation.jsx')
);

const ChangePaymentmode = lazy(
  () => import('./Pages/CancelReschedule/ChangePaymentmode.jsx')
);

const CancellationList = lazy(
  () => import('./Pages/CancelReschedule/CancellationList.jsx')
);

const CancelApplicableProd = lazy(
  () => import('./Pages/CancelReschedule/CancelApplicableProd.jsx')
);

const CancellationListPending = lazy(
  () => import('./Pages/CancelReschedule/CancelPendingPayment.jsx')
);

const AndroidApp = lazy(() => import('./Pages/AndroidApp/AndroidApp.jsx'));

const EstimateItemWiseReport = lazy(
  () => import('./Pages/Reports/Estimate/EstimateItemWiseReport.jsx')
);

const EstimateDateWiseReport = lazy(
  () => import('./Pages/Reports/Estimate/EstimateDateWiseReport.jsx')
);

const OfferForm = lazy(() => import('./Pages/Offer/Offer/OfferFormNew.jsx'));

const OfferList = lazy(() => import('./Pages/Offer/Offer/OfferListNew.jsx'));

const ItemWise = lazy(() => import('./Pages/Offer/ItemOffer/ItemWiseForm.jsx'));
const SalesWiseForm = lazy(
  () => import('./Pages/Offer/SalesOffer/SalesWiseForm.jsx')
);
const SalesWiseList = lazy(
  () => import('./Pages/Offer/SalesOffer/SalesWiseList.jsx')
);

const QuantityWise = lazy(
  () => import('./Pages/Offer/QuantityOffer/QuantityWiseForm.jsx')
);

const BuyOneGetOneForm = lazy(
  () => import('./Pages/Offer/BuyOneGetOneOffer/BuyOneGetOneForm.jsx')
);

const LoyaltyPointsList = lazy(
  () => import('./Pages/Offer/LoyaltyPoints/LoyaltyPointsList.jsx')
);

const BundleOfferForm = lazy(
  () => import('./Pages/Offer/BundleOffer/BundleOfferForm.jsx')
);
const BundleOfferList = lazy(
  () => import('./Pages/Offer/BundleOffer/BundleOfferList.jsx')
);
const CouponWiseOfferlist = lazy(
  () => import('./Pages/Offer/CouponOffer/CouponWiseOfferlist.jsx')
);

const PromocodeList = lazy(
  () => import('./Pages/Offer/PromoCode/PromocodeList.jsx')
);

const OfferCodeList = lazy(
  () => import('./Pages/Offer/OfferCode/OfferCodeList.jsx')
);

const PricingPage = lazy(
  () =>
    import('./Pages/BookingScreen/Components/UtillComponents/PricingPage.jsx')
);

const PurchaseOrder = lazy(
  () => import('./Pages/PurchaseOrder/PurchaseOrder.jsx')
);

const PurchaseOrderMail = lazy(
  () => import('./Pages/PurchaseOrder/PurchaseOrderMail.jsx')
);

const PurchaseOrderList = lazy(
  () => import('./Pages/PurchaseOrder/PurchaseOrderList.jsx')
);

const StockReceivedList = lazy(
  () => import('./Pages/StockTransfer/StockReceivedList.jsx')
);

const GstInvoiceSetUpForm = lazy(
  () => import('./Pages/GstInvoiceSetup/GstInvoiceSetUpForm.jsx')
);

const gstInvoiceSetUpList = lazy(
  () => import('./Pages/GstInvoiceSetup/GstInvoiceSetupList.jsx')
);

const StockinHand = lazy(() => import('./Pages/StockinHand/StockinHand.jsx'));

const PurchaseReturn = lazy(
  () => import('./Pages/PurchaseReturn/purchaseReturn.jsx')
);

const PurchaseReturnget = lazy(
  () => import('./Pages/PurchaseReturn/PurchaseReturnGet.jsx')
);

const KioskBookingPage = lazy(
  () => import('./Pages/Kiosk/KioskBookingPage.jsx')
);

const KioskBookingReceipt = lazy(
  () => import('./Pages/Kiosk/PaymentGateway/PaymentGatewayReceipt.jsx')
);

const KioskComponentList = lazy(
  () => import('./Pages/KioskComponent/KioskComponentList.jsx')
);

const CustomerDisplay = lazy(
  () => import('./Pages/CustomerDisplay/CustomerDisplay.jsx')
);

const PurchaseQuotationForm = lazy(
  () => import('./Pages/PurchaseQuotation/PurchaseQuotationForm.jsx')
);

const DeliveryChallanForm = lazy(
  () => import('./Pages/DeliveryChallan/Deliverychallan.jsx')
);

const DeliveryChallanList = lazy(
  () => import('./Pages/DeliveryChallan/DeliverychallanList.jsx')
);

const ComboOfferMaster = lazy(
  () => import('./Pages/Offer/ComboOfferPack/ComboOfferForm.jsx')
);

const PaymentDeviceForm = lazy(
  () => import('./Pages/Payment/PaymentDevice/PaymentDeviceForm.jsx')
);
const PaymentFailedDetailsList = lazy(
  () =>
    import('./Pages/Payment/PaymentFailedDetails/PaymentFailedDetailsList.jsx')
);

const CounterCategoryMappingForm = lazy(
  () => import('./Pages/CounterCategoryMapping/CounterCategoryMappingForm.jsx')
);

const ImageBulkUpload = lazy(
  () => import('./Pages/ImageBulkUpload/ImageBulkUpload.jsx')
);

const WholesaleBookingPage = lazy(
  () => import('./Pages/PurchaseScreen/LayoutScreen8/LayoutScreen8.jsx')
);

const WholeSaleProductList = lazy(
  () => import('./Pages/Wholesale/ProductList.jsx')
);

const ProductEntry = lazy(() => import('./Pages/Wholesale/ProductEntry.jsx'));

const ProductEntryList = lazy(
  () => import('./Pages/Wholesale/ProductEntryList.jsx')
);
const ItemEntry = lazy(
  () => import('./Pages/Wholesale/ItemEntry/ItemEntry.jsx')
);

const WsPreorder = lazy(
  () => import('./Pages/Wholesalespreorder/WholesalePreorderList.jsx')
);

const WsPreorderForm = lazy(
  () => import('./Pages/Wholesalespreorder/WholesalePreorderForm.jsx')
);

const ExtraChrgesList = lazy(
  () => import('./Pages/Wholesale/ItemEntry/ExtraChrgesList.jsx')
);

const SalesBillCancel = lazy(
  () => import('./Pages/SalesRemoval/SalesBillCancelList.jsx')
);

const WholeSaleAbstract = lazy(
  () => import('./Pages/WholeSaleAbstract/WholeSaleAbstract.jsx')
);

const WholeSaleSellerAbstract = lazy(
  () => import('./Pages/WholeSaleAbstract/WholeSaleSellerAbstract.jsx')
);

const PaymentReceived = lazy(
  () => import('./Pages/WholeSaleTransaction/PaymentReceived.jsx')
);

const WholeSaleSalesReport = lazy(
  () => import('./Pages/WholeSaleReport/WholeSalesSalesReport.jsx')
);

const WholeSalePurchaseReport = lazy(
  () => import('./Pages/WholeSaleReport/WholeSalePurchaseReport.jsx')
);
const WholeSalePaymentPurchaseReport = lazy(
  () =>
    import('./Pages/WholesalePaymentReport/WholeSalePaymentPurchaseReport.jsx')
);

const WholeSalePaymentSalesReport = lazy(
  () =>
    import('./Pages/WholesalePaymentReport/WholeSalePaymementSaleReport.jsx')
);

const SpeechLanguagesList = lazy(
  () => import('./Pages/SpeechLanguages/SpeechLanguagesList.jsx')
);

const LegderList = lazy(
  () => import('./Pages/WholeSaleLedger/WholeSaleLedger.jsx')
);

const SellerMasterTran = lazy(
  () => import('./Pages/WholeSaleTransaction/SellerMasterTransaction.jsx')
);

const TicketForm = lazy(() => import('./Pages/Ticket/TicketForm.jsx'));

const ThemeCreation = lazy(
  () => import('./Pages/BookingScreen/Components/ThemeCreation/ThemeList.jsx')
);

const ThemeSelection = lazy(
  () =>
    import('./Pages/BookingScreen/Components/ThemeCreation/ThemePreview.jsx')
);

const BarcodeTemplateSetup = lazy(
  () => import('./Pages/BarcodeSetup/BarcodeTemplateSetup.jsx')
);

const BarcodeComponentList = lazy(
  () => import('./Pages/BarcodeComponent/BarcodeComponentList.jsx')
);

const StoreRecipelist = lazy(
  () => import('./Pages/StoreKitchen/StoreRecipe/StoreRecipelist.jsx')
);

const StoreRecipeform = lazy(
  () => import('./Pages/StoreKitchen/StoreRecipe/StoreRecipeform.jsx')
);

const Storekitchenlist = lazy(
  () => import('./Pages/StoreKitchen/StoretoKitchen/StoretoKitchenlist.jsx')
);

const StoreKitchenform = lazy(
  () => import('./Pages/StoreKitchen/StoretoKitchen/Storetokitchenform.jsx')
);
import { getSession, sessionStore } from './Services/Others';
import axios from 'axios';
const KitchenFinishlist = lazy(
  () => import('./Pages/StoreKitchen/StoreKitchenFinish/KitchenFinishlist.jsx')
);
const KitechenFinishform = lazy(
  () => import('./Pages/StoreKitchen/StoreKitchenFinish/KitechenFinishform.jsx')
);

const FreeProductList = lazy(
  () => import('./Pages/FreeProducts/FreeProduct/FreeProductList.jsx')
);

const FreePurchaseEnteryForm = lazy(
  () =>
    import('./Pages/FreeProducts/FreePurchase/FreePurchaseEntery/FreePurchaseEnteryForm.jsx')
);
const FreePurchaseEnteryList = lazy(
  () =>
    import('./Pages/FreeProducts/FreePurchase/FreePurchaseEntery/FreePurchaseEnteryList.jsx')
);

const FreePurchaseOrderList = lazy(
  () =>
    import('./Pages/FreeProducts/FreePurchase/FreePurchaseOrder/FreePurchaseOrderList.jsx')
);
const FreePurchaseOrderForm = lazy(
  () =>
    import('./Pages/FreeProducts/FreePurchase/FreePurchaseOrder/FreePurchaseOrderForm.jsx')
);

const FreePurchaseReturnList = lazy(
  () =>
    import('./Pages/FreeProducts/FreePurchase/FreePurchaseReturn/FreePurchaseReturnList.jsx')
);
const FreePurchaseReturnForm = lazy(
  () =>
    import('./Pages/FreeProducts/FreePurchase/FreePurchaseReturn/FreePurchaseReturnForm.jsx')
);
const CommonForm = lazy(
  () => import('./Pages/Offer/LoyaltyPoints/CommonForm.jsx')
);

const ReprintReasonReportList = lazy(
  () =>
    import('./Pages/Reports/ReprintReasonReport/ReprintReasonReportList.jsx')
);

const RevenueItemWiseReport = lazy(
  () => import('./Pages/Reports/Revenue/RevenueItemWiseReport.jsx')
);

const LinkUrlCreate = lazy(
  () => import('./Pages/paymentpdfPage/LinkUrlCreate.jsx')
);

const SupplierProductMapping = lazy(
  () => import('./Pages/SupplierProductMapping/SupplierProductMapping.jsx')
);

const RedirectUserProfile = lazy(
  () => import('./Pages/RedirectUserProfile.jsx')
);

const RelieveRequestForm = lazy(
  () => import('./Pages/EmpMaster/EmpRelieve.jsx')
);

const PurchaseQuotationList = lazy(
  () => import('./Pages/PurchaseQuotation/PurchaseQuotationList.jsx')
);

const ExchangeAndReplacementList = lazy(
  () => import('./Pages/ExchangeAndReplacement/ExchangeAndReplacementList.jsx')
);
const ExchangeAndReplacementForm = lazy(
  () => import('./Pages/ExchangeAndReplacement/ExchangeAndReplacementForm.jsx')
);

const ExchangeReturnMapForm = lazy(
  () => import('./Pages/ExchangeReturnMap/ExchangeReturnMapForm.jsx')
);
const ExchangeReturnMapList = lazy(
  () => import('./Pages/ExchangeReturnMap/ExchangeReturnMapList.jsx')
);

const OtherServicesForm = lazy(
  () => import('./Pages/OtherServices/OtherServicesForm.jsx')
);
const OtherServicesList = lazy(
  () => import('./Pages/OtherServices/OtherServicesList.jsx')
);
const EmpCommisionOrIncentiveForm = lazy(
  () =>
    import('./Pages/EmpCommissionOrIncentive/EmpCommisionOrIncentiveForm.jsx')
);

const EmpCommisionOrIncentiveList = lazy(
  () =>
    import('./Pages/EmpCommissionOrIncentive/EmpCommisionOrIncentiveList.jsx')
);

const SalesBillProductsReturnList = lazy(
  () => import('./Pages/CancelReschedule/SalesBillProductReturnList.jsx')
);

const SalesBillProductsReturn = lazy(
  () => import('./Pages/CancelReschedule/SalesBillProductsReturn.jsx')
);

const DeliveryChallanToInvoiceForm = lazy(
  () =>
    import('./Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceForm.jsx')
);

const DeliveryChallanToInvoiceList = lazy(
  () =>
    import('./Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceList.jsx')
);

const TipAmountSettlementList = lazy(
  () =>
    import('./Pages/Reports/TipAmountSettlement/TipAmountSettlementList.jsx')
);

const EmployeeSettlement = lazy(
  () => import('./Pages/Reports/EmployeeSettlement/EmployeeSettlement.jsx')
);
const PublicQrCode = lazy(() => import('./Pages/Reports/PublicQrCode.jsx'));

const TableMapping = lazy(
  () => import('./Pages/TableMapping/TableMapping.jsx')
);
const TableMAppingList = lazy(
  () => import('./Pages/TableMapping/TableMAppingList.jsx')
);

const PurchaseOrderReport = lazy(
  () => import('./Pages/Reports/PurchaseReport/PurchaseOrderReport.jsx')
);

const SalesOrder = lazy(() => import('./Pages/SalesOrder/SalesOrder.jsx'));

const LoyaltyBased = lazy(
  () => import('./Pages/Offer/LoyaltyBased/LoyaltyBased.jsx')
);
const LoyaltyBasedList = lazy(
  () => import('./Pages/Offer/LoyaltyBased/LoyaltyBasedList.jsx')
);
const CodeBase = lazy(() => import('./Pages/Offer/CodeBase/CodeBase.jsx'));
const CodeBaseList = lazy(
  () => import('./Pages/Offer/CodeBase/CodeBaseList.jsx')
);

const TurboAddForm = lazy(() => import('./Pages/Product/TurboAddForm.jsx'));

const ProductMaster = lazy(() => import('./Pages/Product/ProductMaster.jsx'));

const GatewayMasterConfiguration = lazy(
  () =>
    import('./Pages/GatewayMasterConfiguration/GatewayMasterConfiguration.jsx')
);
const GatewayMasterConfigurationList = lazy(
  () =>
    import('./Pages/GatewayMasterConfiguration/GatewayMasterConfigurationList.jsx')
);

const MembershipForm = lazy(
  () => import('./Pages/Membership/MembershipForm.jsx')
);
const MembershipList = lazy(
  () => import('./Pages/Membership/MembershipList.jsx')
);
const SlotManagementForm = lazy(
  () => import('./Pages/SlotManagement/SlotManagement.jsx')
);
const SlotManagementList = lazy(
  () => import('./Pages/SlotManagement/SlotManagementList.jsx')
);

const BookingReScedule = lazy(
  () => import('./Pages/CancelReschedule/BookingReScedule.jsx')
);
const BookingReSceduleList = lazy(
  () => import('./Pages/CancelReschedule/BookingReSceduleList.jsx')
);

const MembershipReport = lazy(
  () => import('./Pages/Reports/Membership/MembershipReport.jsx')
);
const OpeningStock = lazy(
  () => import('./Pages/openingStock/openingstockForm.jsx')
);
const OpeningStockList = lazy(
  () => import('./Pages/openingStock/OpeningStockList.jsx')
);

const StockAdjustment = lazy(
  () => import('./Pages/StockAdjustment/StockAdjustment.jsx')
);
const StockAdjustmentList = lazy(
  () => import('./Pages/StockAdjustment/StockAdjustmentList.jsx')
);
const TopSellingProducts = lazy(
  () => import('./Pages/DashBoard/TopSellingProductsChart.jsx')
);

const AutomatedReorder = lazy(
  () => import('./Pages/Automated Reorder/AutomatedReorder.jsx')
);
const AutomatedReorderList = lazy(
  () => import('./Pages/Automated Reorder/AutomatedReorderList.jsx')
);

const CustomerPurchaseConfirm = lazy(
  () =>
    import('./Pages/PurchaseOrder/CustomerPurchaseConfirm/CustomerPurchaseConfirm.jsx')
);

const MenuQRCode = lazy(
  () => import('./Pages/Reports/MenuQRCode/MenuQRCode.jsx')
);

const PurchaseLink = lazy(
  () => import('./Pages/PurchaseOrder/CustomerPurchaseConfirm/PurchaseLink.jsx')
);
const RackForm = lazy(() => import('./Pages/Rack/RackForm.jsx'));
const RackList = lazy(() => import('./Pages/Rack/RackList.jsx'));

const CreateTransfer = lazy(
  () => import('./Pages/StockTransfer/CreateTransfer.jsx')
);
const Dispatch = lazy(() => import('./Pages/StockTransfer/Dispatch.jsx'));
const StockTransferList = lazy(
  () => import('./Pages/StockTransfer/TransferList.jsx')
);

const ComboLayout3 = lazy(
  () => import('./Pages/BookingScreen/Template/ComboLayout3/ComboLayout3.jsx')
);

const Productcatlogue = lazy(
  () => import('./Pages/ProductCatlogue/Productcatalogue.jsx')
);

const subDirectory = import.meta.env.BASE_URL;
const apiCommonUrl = import.meta.env.ENV_API_URL_COMMON;

const initSession = () => {
  sessionStore('AppId', 1);
  sessionStore('BranchId', 437);
  sessionStore('AppName', 'Bakery');
  sessionStore('CompId', 281);
  sessionStore('MobileNo', '9360642244');
  sessionStore('UserType', 'Admin');
  sessionStore('UserId', 3333);
  sessionStore('userName', 'Karthiga');

  sessionStorage.setItem(
    'auth',
    'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MDY0MjI0NCIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzcxODcyOTYwLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.tRA41-3-m2VYm_jkndGPLzB-jxzuO1XvG94Fmf6NTGQ'
  );
};

const getAppType = async () => {
  // 🔥 If already stored, don't call API again
  const storedType = getSession('AppType');
  if (storedType) {
    return storedType === 'Wholesale';
  }

  const AppId = getSession('AppId');
  if (!AppId) return null;

  const response = await axios.get(
    `${apiCommonUrl}/application?AppId=${AppId}`
  );

  const subCategoryName =
    response?.data?.data?.[0]?.SubCategoryName?.toLowerCase();

  const isWholesale = subCategoryName === 'wholesale';

  sessionStore('AppType', isWholesale ? 'Wholesale' : 'Sale');

  return isWholesale;
};

const fetchComponent = async () => {
  try {
    initSession();

    const isWholesale = await getAppType();
    if (isWholesale === null) return null;

    return isWholesale
      ? import('./Pages/AppPage/WholesaleAppPage.jsx')
      : import('./Pages/AppPage/AppPage.jsx');
  } catch (err) {
    console.error('API call failed:', err);
    return null;
  }
};
const fetchHomeComponent = async () => {
  try {
    initSession();

    const isWholesale = await getAppType();
    if (isWholesale === null) return null;

    return isWholesale
      ? import('./Pages/DashBoard/WholesaleDashboard.jsx')
      : import('./Pages/DashBoard/RetailDashboard.jsx');
  } catch (err) {
    console.error('API call failed:', err);
    return null;
  }
};

export const routesConfig = [
  { path: `${subDirectory}customer-display`, component: CustomerDisplay },
  { path: `${subDirectory}PricingPage`, component: PricingPage },
  {
    path: `${subDirectory}android-app`,
    component: AndroidApp,
    empAccess: 'Android App',
  },
  { path: `${subDirectory}purchaseordermail`, component: PurchaseOrderMail },
  {
    path: `${subDirectory}viewbill`,
    component: LinkUrlCreate,
    empAccess: 'View Bill',
  },
  //  writed b=y  sree
  // {
  //   path: `${subDirectory}MenuQRCode`,
  //   component: CustomerMenuPage,
  // },
  {
    path: `${subDirectory}purchaseconfirm`,
    component: CustomerPurchaseConfirm,
  },
  {
    path: `${subDirectory}viewpurchaseorder`,
    component: PurchaseLink,
  },
  {
    path: `${subDirectory}combolayout3`,
    component: ComboLayout3,
  },

  {
    path: `${subDirectory}app-page`,
    component: React.lazy(() =>
      fetchComponent().then((module) => ({ default: module.default }))
    ),
    children: [
      {
        path: 'home',
        component: React.lazy(() =>
          fetchHomeComponent().then((module) => ({ default: module.default }))
        ),
      },
      { path: `relieve-request`, component: RelieveRequestForm },
      { path: 'branch-login', component: BranchLogin },
      { path: 'branch-all', component: BackToBranchLogin },
      { path: 'back-to-login', component: BacktoLogin },
      { path: 'logout', component: Logout },
      { path: 'redirect-apps', component: RedirectApps },
      { path: 'redirect-userprofile', component: RedirectUserProfile },
      // { path: 'transaction', component: WSTransaction }
    ],
  },
  {
    path: `${subDirectory}qrprint`,
    component: CreditCustomerPrint,
    empAccess: 'Public',
  },
  { path: `${subDirectory}sales`, component: BookingPage, empAccess: 'Sales' },
  {
    path: `${subDirectory}wholesales`,
    component: WholesaleBookingPage,
    empAccess: 'Whole Sales',
  },
  {
    path: `${subDirectory}kiosksales`,
    component: KioskBookingPage,
    empAccess: 'Kiosk Sales',
  },
  {
    path: `${subDirectory}kiosk-receipt`,
    component: KioskBookingReceipt,
    empAccess: 'Public',
  },
  {
    path: `${subDirectory}payment-page`,
    component: PaymentDetailsPage,
    empAccess: 'Public',
  },
  { path: `${subDirectory}reprint`, component: Reprint },
  {
    path: `${subDirectory}transaction`,
    component: React.lazy(() =>
      fetchComponent().then((module) => ({ default: module.default }))
    ),
    children: [
      { path: 'sales', component: WSTransaction, empAccess: 'Sales' },
      { path: 'payment-received', component: PaymentReceived },
      { path: 'seller-payment', component: SellerMasterTran },
    ],
  },
  {
    path: `${subDirectory}kitchen`,
    component: React.lazy(() =>
      fetchComponent().then((module) => ({ default: module.default }))
    ),
    children: [
      { path: 'kot', component: KOT, empAccess: 'KOT' },
      {
        path: 'kot-display',
        component: CustomerKOTDisplay,
        empAccess: 'KOT Display',
      },
    ],
  },
  {
    path: `${subDirectory}report`,
    component: React.lazy(() =>
      fetchComponent().then((module) => ({ default: module.default }))
    ),
    children: [
      {
        path: 'PublicQrCode',
        component: PublicQrCode,
        empAccess: 'SelfBooking QR Code',
      },
      {
        path: 'MenuQRCode',
        component: MenuQRCode,
        empAccess: 'MenuQRCode',
      },
      {
        path: 'tipamountsettlementlist',
        component: TipAmountSettlementList,
        empAccess: 'Tips',
      },
      {
        path: 'EmployeeSettlement',
        component: EmployeeSettlement,
        empAccess: 'Incentive',
      },
      {
        path: 'datewisereport',
        component: DateWiseReport,
        empAccess: 'Daily Sales',
      },
      {
        path: 'itemwisereport',
        component: ItemWiseReport,
        empAccess: 'By Item',
      },
      {
        path: 'top-selling-products',
        component: TopSellingProducts,
        empAccess: 'Top Selling Products',
      },
      {
        path: 'estimateitemwisereport',
        component: EstimateItemWiseReport,
        empAccess: 'By Item',
      },
      {
        path: 'estimatedatewisereport',
        component: EstimateDateWiseReport,
        empAccess: 'Daily Sales',
      },
      { path: 'ledgerreport', component: LedgerReport, empAccess: 'Ledger' },
      { path: 'ledger', component: LegderList, empAccess: 'Ledger' },
      {
        path: 'stock-in-hand',
        component: StockinHand,
        empAccess: 'Stock Inhand',
      },
      {
        path: 'abstract',
        component: WholeSaleAbstract,
        empAccess: 'Abstract For Sales',
      },
      {
        path: 'sellerabstract',
        component: WholeSaleSellerAbstract,
        empAccess: 'Abstract For Purchase',
      },
      {
        path: 'salesreport',
        component: WholeSaleSalesReport,
        empAccess: 'Daily Sales',
      },
      {
        path: 'purchasereport',
        component: WholeSalePurchaseReport,
        empAccess: 'Purchase',
      },
      {
        path: 'paymentpurchasereport',
        component: WholeSalePaymentPurchaseReport,
        empAccess: 'Purchase Payment',
      },
      {
        path: 'paymentsalesreport',
        component: WholeSalePaymentSalesReport,
        empAccess: 'Sales Payment',
      },
      {
        path: 'reprintreasonreport',
        component: ReprintReasonReportList,
        empAccess: 'Reprint Details',
      },
      {
        path: 'membership',
        component: MembershipReport,
        empAccess: 'Membership Report',
      },
      {
        path: 'revenueitemWisereport',
        component: RevenueItemWiseReport,
        empAccess: 'Gross Margin',
      },

      {
        path: 'PurchaseOrderReport',
        component: PurchaseOrderReport,
        empAccess: 'Purchase',
      },
    ],
  },
  {
    path: `${subDirectory}setting`,
    component: React.lazy(() =>
      fetchComponent().then((module) => ({ default: module.default }))
    ),
    children: [
      {
        path: 'common-master',
        component: CommonMaster,
        empAccess: 'Common Master',
      },
      {
        path: 'other-services',
        component: OtherServicesList,
        empAccess: 'OtherServices',
      },
      {
        path: 'other-services/new',
        component: (props) => <OtherServicesForm {...props} formType="add" />,
        empAccess: 'OtherServices',
      },
      {
        path: 'other-services/update',
        component: (props) => <OtherServicesForm {...props} formType="edit" />,
        empAccess: 'OtherServices',
      },
      {
        path: 'config-type',
        component: ConfigType,
        access: 'Super Admin',
        empAccess: 'Config Type',
      },
      {
        path: 'languages',
        component: SpeechLanguagesList,
        access: 'Super Admin',
        empAccess: 'Languages',
      },
      {
        path: 'preference',
        component: PreferenceList,
        empAccess: 'Preference',
      },
      {
        path: 'price-change',
        component: StockPriceUpdate,
        empAccess: 'Price Change',
      },
      {
        path: 'extra-charges',
        component: ExtraChargesList,
        empAccess: 'Extra Charges',
      },
      {
        path: 'Exchange-Return-policy',
        component: ExchangeAndReplacementList,
        empAccess: 'Exchange / Return',
      },
      {
        path: 'Exchange-Return-policy/new',
        component: (props) => (
          <ExchangeAndReplacementForm {...props} formType="add" />
        ),
        empAccess: 'Exchange / Return',
      },
      {
        path: 'exchange-return-mapping',
        component: ExchangeReturnMapList,
        empAccess: 'Rules Mapping',
      },
      {
        path: 'exchange-return-mapping/new',
        component: (props) => (
          <ExchangeReturnMapForm {...props} formType="edit" />
        ),
        empAccess: 'Rules Mapping',
      },

      {
        path: 'product-catalogue-list',
        component: ProductCatalogueList,
        empAccess: 'Product Catalogue',
      },
      {
        path: 'product-catalogue',
        component: Productcatlogue,
        empAccess: 'Product Catalogue',
      },
      { path: 'admin-tax', component: AdminTax, empAccess: 'Tax' },
      {
        path: 'create-ticket',
        component: TicketForm,
        empAccess: 'Create Ticket',
      },
      {
        path: 'payment-options',
        component: PaymentOptions,
        empAccess: 'Payment Options',
      },
      {
        path: 'payment-received-retail',
        component: PaymentReceivedRetail,
        empAccess: 'Payment Updates',
      },
      {
        path: 'payment-device-access',
        component: PaymentDeviceForm,
        empAccess: 'Payment Device Access',
      },
      {
        path: 'counter-category-mapping',
        component: CounterCategoryMappingForm,
        empAccess: 'Counter Mapping',
      },

      {
        path: 'wholesale-product-master',
        component: WholeSaleProductList,
        empAccess: 'Product',
      },
      {
        path: 'product-entry',
        component: ProductEntryList,
        empAccess: 'Product Entry',
      },
      {
        path: 'product',
        component: ProductMaster,
        empAccess: 'Product Entry',
      },

      {
        path: 'product-entry/new',
        component: (props) => <ProductEntry {...props} formType="add" />,
        empAccess: 'Product Entry',
      },
      {
        path: 'wholesale-extracharges/new',
        component: ItemEntry,
        empAccess: 'Extra Charges',
      },
      {
        path: 'wholesale-extracharges',
        component: ExtraChrgesList,
        empAccess: 'Extra Charges',
      },
      {
        path: 'membership-master/list',
        component: MembershipList,
        empAccess: 'Membership',
      },
      {
        path: 'membership-master/new',
        component: (props) => <MembershipForm {...props} formType="add" />,
        empAccess: 'Membership',
      },
      {
        path: 'membership-master/update',
        component: (props) => <MembershipForm {...props} formType="edit" />,
        empAccess: 'Membership',
      },

      {
        path: 'opening-stock/new',
        component: OpeningStock,
        empAccess: 'Opening Stock',
      },
      {
        path: 'opening-stock',
        component: OpeningStockList,
        empAccess: 'Opening Stock',
      },
      {
        path: 'stock-adjustment',
        component: StockAdjustment,
        empAccess: 'Stock Adjustment',
      },
      {
        path: 'stock-adjustment-list',
        component: StockAdjustmentList,
        empAccess: 'Stock Adjustment',
      },
      {
        path: 'product-master',
        component: ProductMaster,
        empAccess: 'Add Product',
      },
      {
        path: 'product-master/combo',
        component: ProductMaster,
        component: (props) => <ProductMaster {...props} formType="Combo" />,
        empAccess: 'Add Product',
      },
      {
        path: 'product-master/new',
        component: (props) => <ProductForm {...props} formType="add" />,
        empAccess: 'Add Product',
      },
      {
        path: 'products-master/new',
        component: (props) => <Sport_ProductForm {...props} formType="add" />,
        empAccess: 'Add Product',
      },
      {
        path: 'products-master/update',
        component: (props) => <Sport_ProductForm {...props} formType="edit" />,
        empAccess: 'Add Product',
      },
      {
        path: 'product-master/update',
        component: (props) => <ProductForm {...props} formType="edit" />,
        empAccess: 'Add Product',
      },
      {
        path: 'product-master/turbo-add',
        component: (props) => <TurboAddForm {...props} formType="edit" />,
        empAccess: 'Add Product',
      },
      {
        path: 'image-bulk-upload',
        component: ImageBulkUpload,
        empAccess: 'Image Upload',
      },
      {
        path: 'rack-master',
        component: RackList,
        empAccess: 'Add Rack',
      },
      {
        path: 'rack-master/new',
        component: (props) => <RackForm {...props} formType="edit" />,
        empAccess: 'Add Rack',
      },
      {
        path: 'rack-master/update',
        component: (props) => <RackForm {...props} formType="edit" />,
        empAccess: 'Add Rack',
      },
      {
        path: 'slot-management',
        component: (props) => <SlotManagementForm {...props} formType="add" />,
        empAccess: 'Slot Management',
      },
      {
        path: 'slot-management-list',
        component: (props) => <SlotManagementList />,
        empAccess: 'Slot Management',
      },
      {
        path: 'productBased-offer',
        component: OfferList,
        empAccess: 'Product Based',
      },

      {
        path: 'productBased-offer/new',
        component: (props) => <OfferForm {...props} formType="add" />,
        empAccess: 'Product Based',
      },
      {
        path: 'productBased-offer/update',
        component: (props) => <OfferForm {...props} formType="edit" />,
        empAccess: 'Product Based',
      },
      {
        path: 'code-base',
        component: CodeBaseList,
        empAccess: 'Code Based',
      },
      {
        path: 'code-base/new',
        component: (props) => <CodeBase {...props} formType="add" />,
        empAccess: 'Code Based',
      },
      {
        path: 'code-base/new',
        component: (props) => <CodeBase {...props} formType="edit" />,
        empAccess: 'Code Based',
      },

      { path: 'item-wise', component: ItemWise, empAccess: 'Item Wise Offer' },
      {
        path: 'quantity-wise',
        component: QuantityWise,
        empAccess: 'Quantity Wise Offer',
      },
      {
        path: 'buyone-getone',
        component: BuyOneGetOneForm,
        empAccess: 'Buy X and Get X or Y',
      },

      {
        path: 'sales-wise',
        component: SalesWiseList,
        empAccess: 'Sales Wise Offer',
      },
      {
        path: 'sales-wise/new',
        component: (props) => <SalesWiseForm {...props} formType="add" />,
        empAccess: 'Sales Wise Offer',
      },
      {
        path: 'sales-wise/update',
        component: (props) => <SalesWiseForm {...props} formType="edit" />,
        empAccess: 'Sales Wise Offer',
      },

      {
        path: 'loyalty-point',
        component: LoyaltyPointsList,
        empAccess: 'Loyalty Cards',
      },
      {
        path: 'loyalty-based',
        // component: LoyaltyBased,
        component: LoyaltyBasedList,
        empAccess: 'Loyalty Points',
      },
      {
        path: 'loyalty-based/new',
        component: (props) => <LoyaltyBased {...props} formType="add" />,
        empAccess: 'Loyalty Points',
      },
      {
        path: 'loyalty-based/update',
        component: (props) => <LoyaltyBased {...props} formType="edit" />,
        empAccess: 'Loyalty Points',
      },

      {
        path: 'loyalty-point/new',
        component: (props) => (
          <CommonForm {...props} formType="add" masterType="Loyalty Cards" />
        ),
        empAccess: 'Loyalty Cards',
      },
      {
        path: 'loyalty-point/update',
        component: (props) => (
          <CommonForm {...props} formType="edit" masterType="Loyalty Cards" />
        ),
        empAccess: 'Loyalty Cards',
      },
      // { path: 'loyalty-point/new', component: (props) => <LoyaltyPointsForm {...props} formType="add" />, empAccess: "Loyalty Cards" },
      // { path: 'loyalty-point/update', component: (props) => <LoyaltyPointsForm {...props} formType="edit" />, empAccess: "Loyalty Cards" },

      {
        path: 'bundle-offer',
        component: BundleOfferList,
        empAccess: 'Bundle Offer',
      },
      {
        path: 'bundle-offer/new',
        component: (props) => <BundleOfferForm {...props} formType="add" />,
        empAccess: 'Bundle Offer',
      },
      {
        path: 'bundle-offer/update',
        component: (props) => <BundleOfferForm {...props} formType="edit" />,
        empAccess: 'Bundle Offer',
      },

      {
        path: 'coupon',
        component: CouponWiseOfferlist,
        empAccess: 'Coupon Wise Offer',
      },
      {
        path: 'coupon/new',
        component: (props) => (
          <CommonForm
            {...props}
            formType="add"
            masterType="Coupon Wise Offer"
          />
        ),
        empAccess: 'Coupon Wise Offer',
      },
      {
        path: 'coupon/update',
        component: (props) => (
          <CommonForm
            {...props}
            formType="edit"
            masterType="Coupon Wise Offer"
          />
        ),
        empAccess: 'Coupon Wise Offer',
      },
      // { path: 'coupon/new', component: (props) => <CouponWiseOffer {...props} formType="add" />, empAccess: "Coupon Wise Offer" },
      // { path: 'coupon/update', component: (props) => <CouponWiseOffer {...props} formType="edit" />, empAccess: "Coupon Wise Offer" },

      { path: 'promo-code', component: PromocodeList, empAccess: 'Promo Code' },
      {
        path: 'promo-code/new',
        component: (props) => (
          <CommonForm {...props} formType="add" masterType="Promo Code" />
        ),
        empAccess: 'Promo Code',
      },
      {
        path: 'promo-code/update',
        component: (props) => (
          <CommonForm {...props} formType="edit" masterType="Promo Code" />
        ),
        empAccess: 'Promo Code',
      },
      // { path: 'promo-code/new', component: (props) => <PromocodeForm {...props} formType="add" />, empAccess: "Promo Code" },
      // { path: 'promo-code/update', component: (props) => <PromocodeForm {...props} formType="edit" />, empAccess: "Promo Code" },

      { path: 'offer-code', component: OfferCodeList, empAccess: 'Offer Code' },
      {
        path: 'offer-code/new',
        component: (props) => (
          <CommonForm {...props} formType="add" masterType="Offer Code" />
        ),
        empAccess: 'Offer Code',
      },
      {
        path: 'offer-code/update',
        component: (props) => (
          <CommonForm {...props} formType="edit" masterType="Offer Code" />
        ),
        empAccess: 'Offer Code',
      },
      // { path: 'offer-code/new', component: (props) => <OfferCodeForm {...props} formType="add" />, empAccess: "Offer Code" },
      // { path: 'offer-code/update', component: (props) => <OfferCodeForm {...props} formType="edit" />, empAccess: "Offer Code" },

      {
        path: 'customer-master',
        component: CustomerMasterList,
        empAccess: 'Customer',
      },
      {
        path: 'customer-master/new',
        component: (props) => <CustomerForm {...props} formType="add" />,
        empAccess: 'Customer',
      },
      {
        path: 'customer-master/update',
        component: (props) => <CustomerForm {...props} formType="edit" />,
        empAccess: 'Customer',
      },
      {
        path: 'automated-reorder',
        component: AutomatedReorderList,
        empAccess: 'Automated Reorder',
      },
      {
        path: 'automated-reorder/new',
        component: (props) => <AutomatedReorder {...props} formType="add" />,
        empAccess: 'Automated Reorder',
      },
      {
        path: 'automated-reorder/update',
        component: (props) => <AutomatedReorder {...props} formType="edit" />,
        empAccess: 'Automated Reorder',
      },
      {
        path: 'purchase-entry',
        component: StockList,
        empAccess: 'Product Receipt',
      },
      {
        path: 'purchase-entry/new',
        component: (props) => <StockForm {...props} formType="add" />,
        empAccess: 'Product Receipt',
      },
      {
        path: 'purchase-entry/update',
        component: (props) => <StockForm {...props} formType="edit" />,
        empAccess: 'Product Receipt',
      },

      {
        path: 'receive-stocks',
        component: StockReceivedList,
        empAccess: 'Purchase Order',
      },
      {
        path: 'gst-invoice-setup/new',
        component: (props) => <GstInvoiceSetUpForm {...props} formType="add" />,
        empAccess: 'Gst Invoice Setup',
      },
      {
        path: 'gst-invoice-setup/update',
        component: (props) => (
          <GstInvoiceSetUpForm {...props} formType="edit" />
        ),
        empAccess: 'Gst Invoice Setup',
      },
      {
        path: 'gst-invoice-setup',
        component: gstInvoiceSetUpList,
        empAccess: 'Gst Invoice Setup',
      },
      {
        path: 'purchase-order',
        component: PurchaseOrderList,
        empAccess: 'Purchase Order',
      },
      {
        path: 'purchase-order/new',
        component: (props) => <PurchaseOrder {...props} formType="add" />,
        empAccess: 'Purchase Order',
      },

      {
        path: 'purchase-return/list',
        component: PurchaseReturnget,
        empAccess: 'Product Return',
      },
      {
        path: 'purchaseconfirm',
        component: CustomerPurchaseConfirm,
        // empAccess: 'View Bill',
      },
      {
        path: 'purchase-return',
        component: PurchaseReturn,
        empAccess: 'Product Return',
      },
      //free Products
      {
        path: 'free-product-master',
        component: FreeProductList,
        empAccess: 'Add Product',
      },

      {
        path: 'free-purchase-entry',
        component: FreePurchaseEnteryList,
        empAccess: 'Purchase Entry',
      },
      {
        path: 'free-purchase-entry/new',
        component: (props) => (
          <FreePurchaseEnteryForm {...props} formType="add" />
        ),
        empAccess: 'Purchase Entry',
      },
      {
        path: 'free-purchase-entry/update',
        component: (props) => (
          <FreePurchaseEnteryForm {...props} formType="edit" />
        ),
        empAccess: 'Purchase Entry',
      },

      {
        path: 'free-purchase-order',
        component: FreePurchaseOrderList,
        empAccess: 'Purchase Order',
      },
      {
        path: 'free-purchase-order/new',
        component: (props) => (
          <FreePurchaseOrderForm {...props} formType="add" />
        ),
        empAccess: 'Purchase Order',
      },

      {
        path: 'free-purchase-return',
        component: FreePurchaseReturnList,
        empAccess: 'Purchase Return',
      },
      {
        path: 'free-purchase-return/new',
        component: FreePurchaseReturnForm,
        empAccess: 'Purchase Return',
      },
      //free Products
      {
        path: 'sales-quotation',
        component: PurchaseQuotationForm,
        empAccess: 'Sales Quotation',
      },
      {
        path: 'sales-quotation/list',
        component: PurchaseQuotationList,
        empAccess: 'Sales Quotation',
      },
      {
        path: 'sales-order',
        component: SalesOrder,
        empAccess: 'Sales Order',
      },
      // { path: 'delivery-challan',
      //   component: DeliveryChallanList,
      //   empAccess: 'Delivery Challan'
      // },
      {
        path: 'delivery-challan/list',
        component: DeliveryChallanList,
        empAccess: 'Delivery Challan',
      },
      {
        path: 'delivery-challan',
        component: DeliveryChallanForm,
        empAccess: 'Delivery Challan',
      },
      {
        path: 'delivery-challan-to-invoice/list',
        component: DeliveryChallanToInvoiceList,
        empAccess: 'DC to Invoice',
      },
      {
        path: 'delivery-challan-to-invoice',
        component: DeliveryChallanToInvoiceForm,
        empAccess: 'DC to Invoice',
      },

      { path: 'shift-master', component: ShiftMasterList, empAccess: 'Shift' },
      {
        path: 'shift-master/new',
        component: (props) => <ShiftMasterForm {...props} formType="add" />,
        empAccess: 'Shift',
      },
      {
        path: 'shift-master/update',
        component: (props) => <ShiftMasterForm {...props} formType="edit" />,
        empAccess: 'Shift',
      },

      {
        path: 'employee-master',
        component: EmployeeMasterList,
        empAccess: 'Add Employee',
      },
      {
        path: 'employee-master/new',
        component: (props) => <EmployeeMasterForm {...props} formType="add" />,
        empAccess: 'Add Employee',
      },
      {
        path: 'employee-master/update',
        component: (props) => <EmployeeMasterForm {...props} formType="edit" />,
        empAccess: 'Add Employee',
      },
      {
        path: 'commission-or-incentive-master',
        component: EmpCommisionOrIncentiveList,
        empAccess: 'Incentive',
      },
      {
        path: 'commission-or-incentive-master/new',
        component: (props) => (
          <EmpCommisionOrIncentiveForm {...props} formType="add" />
        ),
        empAccess: 'Incentive',
      },
      {
        path: 'commission-or-incentive-master/update',
        component: (props) => (
          <EmpCommisionOrIncentiveForm {...props} formType="edit" />
        ),
        empAccess: 'Incentive',
      },
      {
        path: 'supplier-master',
        component: SupplierMasterList,
        empAccess: 'Add Supplier',
      },
      {
        path: 'supplier-master/new',
        component: (props) => <SupplierMasterForm {...props} formType="add" />,
        empAccess: 'Add Supplier',
      },
      {
        path: 'supplier-master/update',
        component: (props) => <SupplierMasterForm {...props} formType="edit" />,
        empAccess: 'Add Supplier',
      },
      {
        path: 'stock-transfer',
        component: CreateTransfer,
        empAccess: 'Create Transfer',
      },
      {
        path: 'stock-dispatch',
        component: Dispatch,
        empAccess: 'Dispatch',
      },
      {
        path: 'stock-transferlist',
        component: StockTransferList,
        empAccess: 'Create Transfer',
      },
      {
        path: 'supplierproductmapping-master',
        component: SupplierProductMapping,
        empAccess: 'Product Mapping',
      },
      // { path: 'supplier-master/new', component: (props) => <SupplierMasterForm {...props} formType="add" />, empAccess: "Supplier" },
      // { path: 'supplier-master/update', component: (props) => <SupplierMasterForm {...props} formType="edit" />, empAccess: "Supplier" },

      {
        path: 'dinein-master',
        component: DiningMasterList,
        empAccess: 'Dine In',
      },
      {
        path: 'dinein-master/new',
        component: (props) => <DiningMasterForm {...props} formType="add" />,
        empAccess: 'Dine In',
      },
      {
        path: 'dinein-master/edit',
        component: (props) => <DiningMasterForm {...props} formType="edit" />,
        empAccess: 'Dine In',
      },

      {
        path: 'combo-master',
        component: ComboList,
        empAccess: 'Add Product',
      },
      {
        path: 'combo-master/new',
        component: (props) => <ComboMaster {...props} formType="add" />,
        empAccess: 'Add Product',
      },
      {
        path: 'combo-master/update',
        component: (props) => <ComboMaster {...props} formType="edit" />,
        empAccess: 'Add Product',
      },

      {
        path: 'combo-offer-master',
        component: ComboOfferMaster,
        empAccess: 'Combo Price',
      },

      {
        path: 'payment-details',
        component: PaymentDetailsList,
        empAccess: 'Payment Details',
      },
      {
        path: 'payment-details/new',
        component: (props) => <PaymentDetails {...props} formType="add" />,
        empAccess: 'Payment Details',
      },
      {
        path: 'payment-details/update',
        component: (props) => <PaymentDetails {...props} formType="edit" />,
        empAccess: 'Payment Details',
      },

      {
        path: 'payment-failed-details',
        component: PaymentFailedDetailsList,
        empAccess: 'Payment Failed Details',
      },
      {
        path: 'TableMapping/update',
        component: (props) => <TableMapping {...props} formType="add" />,
        empAccess: 'Table Mapping',
      },
      {
        path: 'TableMapping',
        component: TableMAppingList,
        empAccess: 'Table Mapping',
      },
      {
        path: 'employee-access',
        component: EmpAccessList,
        empAccess: 'Employee Access',
      },
      {
        path: 'employee-access/new',
        component: (props) => <EmpAccessForm {...props} formType="add" />,
        empAccess: 'Employee Access',
      },
      {
        path: 'employee-access/update',
        component: (props) => <EmpAccessForm {...props} formType="edit" />,
        empAccess: 'Employee Access',
      },
      {
        path: 'employee-screenrights',
        component: EmpScreenAccessList,
        empAccess: 'Employee Screen Rights',
      },
      {
        path: 'employee-screenrights/new',
        component: (props) => (
          <EmpScreenRightsAccess {...props} formType="add" />
        ),
        empAccess: 'Employee Screen Rights',
      },
      {
        path: 'employee-screenrights/update',
        component: (props) => (
          <EmpScreenRightsAccess {...props} formType="edit" />
        ),
        empAccess: 'Employee Screen Rights',
      },

      {
        path: 'cancel-reschedule-rules',
        component: CancellationList,
        empAccess: 'Cancel / Reschedule',
      },
      {
        path: 'cancel-reschedule-rules/new',
        component: (props) => <Cancellation {...props} formType="add" />,
        empAccess: 'Cancel / Reschedule',
      },
      {
        path: 'cancel-reschedule-rules/update',
        component: (props) => <Cancellation {...props} formType="edit" />,
        empAccess: 'Cancel / Reschedule',
      },

      {
        path: 'cancel-applicable-product',
        component: CancelApplicableProd,
        empAccess: 'Cancel Applicable Products',
      },
      {
        path: 'cancel-paymentchange',
        component: ChangePaymentmode,
        empAccess: 'Payment Mode Change',
      },
      {
        path: 'cancel-pendingpayment',
        component: CancellationListPending,
        empAccess: 'Cancel Unpaid Order',
      },
      {
        path: 'sales-bill-cancel',
        component: SalesBillCancel,
        empAccess: 'Sales Entry Cancel',
      },
      {
        path: 'sales-bill-product-return/list',
        component: SalesBillProductsReturnList,
        empAccess: 'Sales Product Return',
      },
      {
        path: 'sales-bill-product-return',
        component: SalesBillProductsReturn,
        empAccess: 'Sales Product Return',
      },
      {
        path: 'booking-reschedule',
        component: BookingReScedule,
        empAccess: 'Booking Reschedule',
      },
      {
        path: 'booking-reschedule/list',
        component: BookingReSceduleList,
        empAccess: 'Booking Reschedule',
      },

      {
        path: 'wholesale-preorder',
        component: WsPreorder,
        empAccess: 'Preorder',
      },
      {
        path: 'wholesale-preorder/new',
        component: (props) => <WsPreorderForm {...props} formType="add" />,
        empAccess: 'Preorder',
      },
      {
        path: 'wholesale-preorder/update',
        component: (props) => <WsPreorderForm {...props} formType="edit" />,
        empAccess: 'Preorder',
      },

      {
        path: 'custom-product',
        component: StoreRecipelist,
        empAccess: 'Bill Of Material',
      },
      {
        path: 'custom-product/new',
        component: (props) => <StoreRecipeform {...props} formType="add" />,
        empAccess: 'Bill Of Material',
      },
      {
        path: 'custom-product/update',
        component: (props) => <StoreRecipeform {...props} formType="edit" />,
        empAccess: 'Bill Of Material',
      },

      {
        path: 'store-to-production',
        component: Storekitchenlist,
        empAccess: 'Material Issue',
      },
      {
        path: 'store-to-production/new',
        component: (props) => <StoreKitchenform {...props} formType="add" />,
        empAccess: 'Material Issue',
      },
      {
        path: 'store-to-production/update',
        component: (props) => <StoreKitchenform {...props} formType="edit" />,
        empAccess: 'Material Issue',
      },

      {
        path: 'ready-for-sale',
        component: KitchenFinishlist,
        empAccess: 'Finished Goods',
      },
      {
        path: 'ready-for-sale/new',
        component: (props) => <KitechenFinishform {...props} formType="add" />,
        empAccess: 'Finished Goods',
      },
      {
        path: 'ready-for-sale/update',
        component: (props) => <KitechenFinishform {...props} formType="edit" />,
        empAccess: 'Finished Goods',
      },

      {
        path: 'gateway-master-configuration/new',
        component: (props) => (
          <GatewayMasterConfiguration {...props} formType="add" />
        ),
        empAccess: 'Gateway Master Configuration',
      },
      {
        path: 'gateway-master-configuration/update',
        component: (props) => (
          <GatewayMasterConfiguration {...props} formType="edit" />
        ),
        empAccess: 'Gateway Master Configuration',
      },
      {
        path: 'gateway-master-configuration/list',
        component: GatewayMasterConfigurationList,
        empAccess: 'Gateway Master Configuration',
      },
    ],
  },
  {
    path: `${subDirectory}sales`,
    component: React.lazy(() =>
      fetchComponent().then((module) => ({ default: module.default }))
    ),
    children: [{ path: 'dine-in', component: TableBooking }],
    empAccess: 'Sales Entry',
  },
  {
    path: `${subDirectory}saleslayouts`,
    component: React.lazy(() =>
      fetchComponent().then((module) => ({ default: module.default }))
    ),
    children: [
      {
        path: 'sales-selection',
        component: BookingSelectionPage,
        empAccess: 'Sales Screen',
      },
      {
        path: 'print-selection',
        component: PrintSelectionPage,
        empAccess: 'Print Forms',
      },
      {
        path: 'kiosk-selection',
        component: KioskMainPage,
        empAccess: 'Kiosk Screen',
      },
      {
        path: `barcode-qr-selection`,
        component: BarcodeTemplateSetup,
        empAccess: 'Barcode / QR',
      },
      {
        path: 'kiosk-component',
        component: KioskComponentList,
        access: 'Super Admin',
        empAccess: 'Kiosk Component',
      },
      {
        path: 'component-master',
        component: ComponentMasterList,
        access: 'Super Admin',
        empAccess: 'Component Master',
      },
      {
        path: 'barcode-master',
        component: BarcodeComponentList,
        access: 'Super Admin',
        empAccess: 'Barcode Component',
      },
      {
        path: 'component-master/new',
        component: (props) => <ComponentMasterForm formType="add" {...props} />,
        access: 'Super Admin',
        empAccess: 'Component Master',
      },
      {
        path: 'component-master/update',
        component: (props) => (
          <ComponentMasterForm formType="edit" {...props} />
        ),
        access: 'Super Admin',
        empAccess: 'Component Master',
      },
      {
        path: 'theme-creation',
        component: ThemeCreation,
        access: 'Super Admin',
        empAccess: 'Theme Creation',
      },
      {
        path: 'themeselection/new',
        component: (props) => <ThemeSelection formType="add" {...props} />,
        access: 'Super Admin',
        empAccess: 'Theme Creation',
      },
      {
        path: 'themeselection/update',
        component: (props) => <ThemeSelection formType="edit" {...props} />,
        access: 'Super Admin',
        empAccess: 'Theme Creation',
      },
    ],
  },
];
