import React from 'react';
import AppPage from './Pages/AppPage/AppPage.jsx';
import WholesaleAppPage from './Pages/AppPage/WholesaleAppPage.jsx';
import Home from './Pages/DashBoard/RetailDashboard.jsx';
import CommonMaster from './Pages/CommonMaster/CommonMaster.jsx';
import ConfigType from './Pages/ConfigType/ConfigTypeForm.jsx';
import AdminTax from './Pages/AdminTax/AdminTaxForm.jsx';
import ProductForm from './Pages/Product/ProductForm.jsx';
import Sport_ProductForm from './Pages/Product/SportsMaster.jsx';
import ProductList from './Pages/Product/ProductList.jsx';
import ShiftMasterList from './Pages/ShiftMaster/ShiftMasterList.jsx';
import ShiftMasterForm from './Pages/ShiftMaster/ShiftMasterForm.jsx';
import EmployeeMasterList from './Pages/EmpMaster/EmpMasterList.jsx';
import EmployeeMasterForm from './Pages/EmpMaster/EmpMasterForm.jsx';
import SupplierMasterList from './Pages/SupplierMaster/SupplierMasterList.jsx';
import SupplierMasterForm from './Pages/SupplierMaster/SupplierMasterForm.jsx';
import ComponentMasterForm from './Pages/UiComponentPage/ComponentForm.jsx';
import ComponentMasterList from './Pages/UiComponentPage/ComponentList.jsx';
import CustomerForm from './Pages/CustomerMaster/CustMasterForm.jsx';
import CustomerMasterList from './Pages/CustomerMaster/CustMasterList.jsx';
import DateWiseReport from './Pages/Reports/DateWiseReport/DateWiseReport.jsx';
import ItemWiseReport from './Pages/Reports/ItemWiseReport/ItemWiseReport.jsx';
import Reprint from './Pages/BookingScreen/Components/OtherConponents/Reprint/BSReprint.jsx';
import BookingSelectionPage from './Pages/BookingScreen/Components/MainPage/MainPage.jsx';
import PrintSelectionPage from './Pages/BookingScreen/Components/PrintMainPage/MainPage.jsx';
import KioskMainPage from './Pages/BookingScreen/Components/Kiosk/KioskMainPage.jsx';
import BookingPage from './Pages/BookingScreen/BookingPage.jsx';
import StockForm from './Pages/StockMaster/StockForm.jsx';
import StockList from './Pages/StockMaster/StockList.jsx';
import DiningMasterList from './Pages/Dining/DiningList.jsx';
import DiningMasterForm from './Pages/Dining/DiningForm.jsx';
import TableBooking from './Pages/Tablebooking/TableBooking.jsx';
import ComboMaster from './Pages/ComboPack/ComboMaster.jsx';
import ComboList from './Pages/ComboPack/ComboMasterlist.jsx';
import EmpAccessForm from './Pages/EmpAccess/EmpAccessForm.jsx';
import EmpAccessList from './Pages/EmpAccess/EmpAccessList.jsx';
import EmpScreenAccessList from './Pages/EmpScreenAccess/EmpScreenAccessList.jsx';
import EmpScreenRightsAccess from './Pages/EmpScreenAccess/EmpScreenRightsAccess.jsx';
import PreferenceList from './Pages/Preference/PreferenceList.jsx';
import PaymentOptions from './Pages/Payment/PaymentOptions/PaymentOptions.jsx';
import PaymentDetails from './Pages/Payment/PaymentDetails/PaymentDetailsForm.jsx';
import PaymentDetailsList from './Pages/Payment/PaymentDetails/PaymentDetailsList.jsx';
import PaymentReceivedRetail from './Pages/Payment/PaymentReceivedRetail/PaymentReceivedRetail.jsx';
import ExtraChargesList from './Pages/ExtraCharges/ExtraChargesList.jsx';
import BranchLogin from './Pages/BranchLogin/BranchLogin.jsx';
import BackToBranchLogin from './Pages/BranchLogin/BackToBranchLogin.jsx';
import Logout from './Pages/Logout.jsx';
import BacktoLogin from './Pages/BranchLogin/BacktoLogin.jsx';
import StockPriceUpdate from './Pages/StockPriceUpdate/StockPriceUpdate.jsx';
import ProductCatalogueList from './Pages/ProductCatlogue/ProductcatlogueList.jsx';
import KOT from './Pages/Reports/KOT/kot.jsx';
import CustomerKOTDisplay from './Pages/Reports/KOT/CustomerKOTDisplay.jsx';
import RedirectApps from './Pages/RedirectApps.jsx';
import WSTransaction from './Pages/WholeSaleTransaction/WSSalesTransaction.jsx';
import LedgerReport from './Pages/Reports/LedgerReport/LedgerReport.jsx';
import PaymentDetailsPage from './Pages/BookingScreen/Components/BookingFunctionality/PaymentDetailsPage.jsx';
import CreditCustomerPrint from './Pages/BookingScreen/Components/BookingFunctionality/CreditDownloadpage.jsx';
import Cancellation from './Pages/CancelReschedule/Cancellation.jsx';
import ChangePaymentmode from './Pages/CancelReschedule/ChangePaymentmode.jsx';
import CancellationList from './Pages/CancelReschedule/CancellationList.jsx';
import CancelApplicableProd from './Pages/CancelReschedule/CancelApplicableProd.jsx';
import CancellationListPending from './Pages/CancelReschedule/CancelPendingPayment.jsx';
import AndroidApp from './Pages/AndroidApp/AndroidApp.jsx';
import EstimateItemWiseReport from './Pages/Reports/Estimate/EstimateItemWiseReport.jsx';
import EstimateDateWiseReport from './Pages/Reports/Estimate/EstimateDateWiseReport.jsx';
import OfferForm from './Pages/Offer/Offer/OfferFormNew.jsx';
import OfferList from './Pages/Offer/Offer/OfferListNew.jsx';
import ItemWise from './Pages/Offer/ItemOffer/ItemWiseForm.jsx';
import SalesWiseForm from './Pages/Offer/SalesOffer/SalesWiseForm.jsx';
import SalesWiseList from './Pages/Offer/SalesOffer/SalesWiseList.jsx';
import QuantityWise from './Pages/Offer/QuantityOffer/QuantityWiseForm.jsx';
import BuyOneGetOneForm from './Pages/Offer/BuyOneGetOneOffer/BuyOneGetOneForm.jsx';
// import LoyaltyPointsForm from "./Pages/Offer/LoyaltyPoints/LoyaltyPointsForm.jsx";
import LoyaltyPointsList from './Pages/Offer/LoyaltyPoints/LoyaltyPointsList.jsx';
import BundleOfferForm from './Pages/Offer/BundleOffer/BundleOfferForm.jsx';
import BundleOfferList from './Pages/Offer/BundleOffer/BundleOfferList.jsx';
// import CouponWiseOffer from "./Pages/Offer/CouponOffer/CouponWiseOfferForm.jsx"
import CouponWiseOfferlist from './Pages/Offer/CouponOffer/CouponWiseOfferlist.jsx';
import PromocodeList from './Pages/Offer/PromoCode/PromocodeList.jsx';
// import PromocodeForm from "./Pages/Offer/PromoCode/PromocodeForm.jsx";
import OfferCodeList from './Pages/Offer/OfferCode/OfferCodeList.jsx';
// import OfferCodeForm from "./Pages/Offer/OfferCode/OfferCodeForm.jsx";
import PricingPage from './Pages/BookingScreen/Components/UtillComponents/PricingPage.jsx';
import PurchaseOrder from './Pages/PurchaseOrder/PurchaseOrder.jsx';
import PurchaseOrderMail from './Pages/PurchaseOrder/PurchaseOrderMail.jsx';
import PurchaseOrderList from './Pages/PurchaseOrder/PurchaseOrderList.jsx';
import StockReceivedList from './Pages/StockTransfer/StockReceivedList.jsx';
import GstInvoiceSetUpForm from './Pages/GstInvoiceSetup/GstInvoiceSetUpForm.jsx';
import gstInvoiceSetUpList from './Pages/GstInvoiceSetup/GstInvoiceSetupList.jsx';
import StockinHand from './Pages/StockinHand/StockinHand.jsx';

import PurchaseReturn from './Pages/PurchaseReturn/purchaseReturn.jsx';
import PurchaseReturnget from './Pages/PurchaseReturn/PurchaseReturnGet.jsx';
import KioskBookingPage from './Pages/Kiosk/KioskBookingPage.jsx';
import KioskBookingReceipt from './Pages/Kiosk/PaymentGateway/PaymentGatewayReceipt.jsx';
import KioskComponentList from './Pages/KioskComponent/KioskComponentList.jsx';
import CustomerDisplay from './Pages/CustomerDisplay/CustomerDisplay.jsx';
import PurchaseQuotationForm from './Pages/PurchaseQuotation/PurchaseQuotationForm.jsx';
import DeliveryChallanForm from './Pages/DeliveryChallan/Deliverychallan.jsx';
import DeliveryChallanList from './Pages/DeliveryChallan/DeliverychallanList.jsx';
import ComboOfferMaster from './Pages/Offer/ComboOfferPack/ComboOfferForm.jsx';
import PaymentDeviceForm from './Pages/Payment/PaymentDevice/PaymentDeviceForm.jsx';
import PaymentFailedDetailsList from './Pages/Payment/PaymentFailedDetails/PaymentFailedDetailsList.jsx';
import CounterCategoryMappingForm from './Pages/CounterCategoryMapping/CounterCategoryMappingForm.jsx';
import ImageBulkUpload from './Pages/ImageBulkUpload/ImageBulkUpload.jsx';
import WholesaleBookingPage from './Pages/PurchaseScreen/LayoutScreen8/LayoutScreen8.jsx';
import WholeSaleProductList from './Pages/Wholesale/ProductList.jsx';
import ProductEntry from './Pages/Wholesale/ProductEntry.jsx';
import ProductEntryList from './Pages/Wholesale/ProductEntryList.jsx';
import ItemEntry from './Pages/Wholesale/ItemEntry/ItemEntry.jsx';
import WsPreorder from './Pages/Wholesalespreorder/WholesalePreorderList.jsx';
import WsPreorderForm from './Pages/Wholesalespreorder/WholesalePreorderForm.jsx';
import ExtraChrgesList from './Pages/Wholesale/ItemEntry/ExtraChrgesList.jsx';
import SalesBillCancel from './Pages/SalesRemoval/SalesBillCancelList.jsx';
import WholeSaleAbstract from './Pages/WholeSaleAbstract/WholeSaleAbstract.jsx';
import WholeSaleSellerAbstract from './Pages/WholeSaleAbstract/WholeSaleSellerAbstract.jsx';
import PaymentReceived from './Pages/WholeSaleTransaction/PaymentReceived.jsx';
import WholeSaleSalesReport from './Pages/WholeSaleReport/WholeSalesSalesReport.jsx';
import WholeSalePurchaseReport from './Pages/WholeSaleReport/WholeSalePurchaseReport.jsx';
import WholeSalePaymentPurchaseReport from './Pages/WholesalePaymentReport/WholeSalePaymentPurchaseReport.jsx';
import WholeSalePaymentSalesReport from './Pages/WholesalePaymentReport/WholeSalePaymementSaleReport.jsx';
import SpeechLanguagesList from './Pages/SpeechLanguages/SpeechLanguagesList.jsx';
import LegderList from './Pages/WholeSaleLedger/WholeSaleLedger.jsx';
import SellerMasterTran from './Pages/WholeSaleTransaction/SellerMasterTransaction.jsx';
import TicketForm from './Pages/Ticket/TicketForm.jsx';
import ThemeCreation from './Pages/BookingScreen/Components/ThemeCreation/ThemeList.jsx';
import ThemeSelection from './Pages/BookingScreen/Components/ThemeCreation/ThemePreview.jsx';
import BarcodeTemplateSetup from './Pages/BarcodeSetup/BarcodeTemplateSetup.jsx';
import BarcodeComponentList from './Pages/BarcodeComponent/BarcodeComponentList.jsx';
import StoreRecipelist from './Pages/StoreKitchen/StoreRecipe/StoreRecipelist.jsx';
import StoreRecipeform from './Pages/StoreKitchen/StoreRecipe/StoreRecipeform.jsx';
import Storekitchenlist from './Pages/StoreKitchen/StoretoKitchen/StoretoKitchenlist.jsx';
import StoreKitchenform from './Pages/StoreKitchen/StoretoKitchen/Storetokitchenform.jsx';
import { axiosCommonInstanceData } from './Features/AuthenicationToken/AuthenticationToken';
import { getSession, sessionStore } from './Services/Others';
import axios from 'axios';
import KitchenFinishlist from './Pages/StoreKitchen/StoreKitchenFinish/KitchenFinishlist.jsx';
import KitechenFinishform from './Pages/StoreKitchen/StoreKitchenFinish/KitechenFinishform.jsx';

import FreeProductList from './Pages/FreeProducts/FreeProduct/FreeProductList.jsx';
import FreePurchaseEnteryForm from './Pages/FreeProducts/FreePurchase/FreePurchaseEntery/FreePurchaseEnteryForm.jsx';
import FreePurchaseEnteryList from './Pages/FreeProducts/FreePurchase/FreePurchaseEntery/FreePurchaseEnteryList.jsx';
import FreePurchaseOrderList from './Pages/FreeProducts/FreePurchase/FreePurchaseOrder/FreePurchaseOrderList.jsx';
import FreePurchaseOrderForm from './Pages/FreeProducts/FreePurchase/FreePurchaseOrder/FreePurchaseOrderForm.jsx';
import FreePurchaseReturnList from './Pages/FreeProducts/FreePurchase/FreePurchaseReturn/FreePurchaseReturnList.jsx';
import FreePurchaseReturnForm from './Pages/FreeProducts/FreePurchase/FreePurchaseReturn/FreePurchaseReturnForm.jsx';
import CommonForm from './Pages/Offer/LoyaltyPoints/CommonForm.jsx';
import ReprintReasonReportList from './Pages/Reports/ReprintReasonReport/ReprintReasonReportList.jsx';
import RevenueItemWiseReport from './Pages/Reports/Revenue/RevenueItemWiseReport.jsx';
import LinkUrlCreate from './Pages/paymentpdfPage/LinkUrlCreate.jsx';
import SupplierProductMapping from './Pages/SupplierProductMapping/SupplierProductMapping.jsx';
import RedirectUserProfile from './Pages/RedirectUserProfile.jsx';
import RelieveRequestForm from './Pages/EmpMaster/EmpRelieve.jsx';
import PurchaseQuotationList from './Pages/PurchaseQuotation/PurchaseQuotationList.jsx';
import ExchangeAndReplacementList from './Pages/ExchangeAndReplacement/ExchangeAndReplacementList.jsx';
import ExchangeAndReplacementForm from './Pages/ExchangeAndReplacement/ExchangeAndReplacementForm.jsx';
import ExchangeReturnMapForm from './Pages/ExchangeReturnMap/ExchangeReturnMapForm.jsx';
import ExchangeReturnMapList from './Pages/ExchangeReturnMap/ExchangeReturnMapList.jsx';
import OtherServicesForm from './Pages/OtherServices/OtherServicesForm.jsx';
import OtherServicesList from './Pages/OtherServices/OtherServicesList.jsx';
import EmpCommisionOrIncentiveForm from './Pages/EmpCommissionOrIncentive/EmpCommisionOrIncentiveForm.jsx';
import EmpCommisionOrIncentiveList from './Pages/EmpCommissionOrIncentive/EmpCommisionOrIncentiveList.jsx';
import SalesBillProductsReturnList from './Pages/CancelReschedule/SalesBillProductReturnList.jsx';
import SalesBillProductsReturn from './Pages/CancelReschedule/SalesBillProductsReturn.jsx';
import DeliveryChallanToInvoiceForm from './Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceForm.jsx';
import DeliveryChallanToInvoiceList from './Pages/DeliveryChallanToInvoice/DeliveryChallanToInvoiceList.jsx';
import TipAmountSettlementList from './Pages/Reports/TipAmountSettlement/TipAmountSettlementList.jsx';
import EmployeeSettlement from './Pages/Reports/EmployeeSettlement/EmployeeSettlement.jsx';
import PublicQrCode from './Pages/Reports/PublicQrCode.jsx';
import TableMapping from './Pages/TableMapping/TableMapping.jsx';
import TableMAppingList from './Pages/TableMapping/TableMAppingList.jsx';
import PurchaseOrderReport from './Pages/Reports/PurchaseReport/PurchaseOrderReport.jsx';
import SalesOrder from './Pages/SalesOrder/SalesOrder.jsx';
import LoyaltyBased from './Pages/Offer/LoyaltyBased/LoyaltyBased.jsx';
import LoyaltyBasedList from './Pages/Offer/LoyaltyBased/LoyaltyBasedList.jsx';
import CodeBase from './Pages/Offer/CodeBase/CodeBase.jsx';
import CodeBaseList from './Pages/Offer/CodeBase/CodeBaseList.jsx';
import TurboAddForm from './Pages/Product/TurboAddForm.jsx';
import ProductMaster from './Pages/Product/ProductMaster.jsx';
import GatewayMasterConfiguration from './Pages/GatewayMasterConfiguration/GatewayMasterConfiguration.jsx';
import GatewayMasterConfigurationList from './Pages/GatewayMasterConfiguration/GatewayMasterConfigurationList.jsx';
import MembershipForm from './Pages/Membership/MembershipForm.jsx';
import MembershipList from './Pages/Membership/MembershipList.jsx';
import SlotManagementForm from './Pages/SlotManagement/SlotManagement.jsx';
import SlotManagementList from './Pages/SlotManagement/SlotManagementList.jsx';
import BookingReScedule from './Pages/CancelReschedule/BookingReScedule.jsx';
import BookingReSceduleList from './Pages/CancelReschedule/BookingReSceduleList.jsx';
import MembershipReport from './Pages/Reports/Membership/MembershipReport.jsx';
import OpeningStock from './Pages/openingStock/openingstockForm.jsx';
import OpeningStockList from './Pages/openingStock/OpeningStockList.jsx';
import StockAdjustment from './Pages/StockAdjustment/StockAdjustment.jsx';
import StockAdjustmentList from './Pages/StockAdjustment/StockAdjustmentList.jsx';
import TopSellingProducts from './Pages/DashBoard/TopSellingProductsChart.jsx';
import AutomatedReorder from './Pages/Automated Reorder/AutomatedReorder.jsx';
import AutomatedReorderList from './Pages/Automated Reorder/AutomatedReorderList.jsx';
import CustomerPurchaseConfirm from './Pages/PurchaseOrder/CustomerPurchaseConfirm/CustomerPurchaseConfirm.jsx';
import MenuQRCode from './Pages/Reports/MenuQRCode/MenuQRCode.jsx';
import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx';
import PurchaseLink from './Pages/PurchaseOrder/CustomerPurchaseConfirm/PurchaseLink.jsx';
import RackForm from './Pages/Rack/RackForm.jsx';
import RackList from './Pages/Rack/RackList.jsx';
import CreateTransfer from './Pages/StockTransfer/CreateTransfer.jsx';
import Dispatch from './Pages/StockTransfer/Dispatch.jsx';
import ComboLayout3 from './Pages/BookingScreen/Template/ComboLayout3/ComboLayout3.jsx';
import StockTransferList from './Pages/StockTransfer/TransferList.jsx';

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

const fetchComponent = async () => {
  try {
    //  sessionStore('AppId', 82);
    // sessionStore('BranchId', 404);
    // sessionStore('AppName', 'Sports');
    // sessionStore('CompId', 256);
    // sessionStore('MobileNo', '9698838966');
    // sessionStore('UserType', 'Admin');
    // sessionStore('UserId', 3128);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTY5ODgzODk2NiIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY3OTg0OTk1LCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.dbwbvmzkddUYIDrLif1jKC8n5ZiOUqpWdW1Xeq1tGuc'
    // );

    // sessionStore('AppId', 1);
    // sessionStore('BranchId', 121);
    // sessionStore('AppName', 'Bakery');
    // sessionStore('CompId', 72);
    // sessionStore('MobileNo', '8072329153');
    // sessionStore('UserType', 'Admin');
    // sessionStore('UserId', 39);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiODA3MjMyOTE1MyIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY3NzIzOTk0LCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.Uyham6EJoEgXqhVQFyWPPcs1cclWpWT9jedyrxOzAI4'
    // );

    //   sessionStore("AppId", 1)
    // sessionStore("BranchId", 127)
    // sessionStore("AppName", "Restaraunt")
    // sessionStore("CompId", 77)
    // sessionStore("MobileNo", "9972702376")
    // sessionStore("UserType", "Admin")
    // sessionStore("UserId", 1791)
    // sessionStore("userName", "Karthiga")
    // sessionStorage.setItem('auth', "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTk3MjcwMjM3NiIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY1OTEyODgyLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.OxzLs_XOl61Rs-PgLdWAUiYscycnOcyckQ_QeviwpAY")

    // sessionStore('AppId', 1);
    // sessionStore('BranchId', 435);
    // sessionStore('AppName', 'Bakery');
    // sessionStore('CompId', 280);
    // sessionStore('MobileNo', '9360642222');
    // sessionStore('UserType', 'Admin');
    // sessionStore('UserId', 3308);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MDY0MjIyMiIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY3OTg2MDI1LCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.bHBj3BFUflN62gdSlS6qFqL6cDlGZqOwcRBJTFB-Zy8'
    // );
    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.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MDY0MjI0NCIsIlBhc3N3b3JkIjoiWkB6NjUzOTU0IiwiYXVkIjpbImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxMyIsImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxMiIsImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxNCIsImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxMyJdLCJleHAiOjE3Njk2MjY3NTcsImlzcyI6Imh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAwMSJ9.Zm9iKUTOTx780VfHtgXwmdz6aYl_0oRjL5DNqo2T9pI'
    );

    const AppId = getSession('AppId');
    if (AppId != null && AppId != undefined) {
      const response = await axios.get(
        `${apiCommonUrl}/application?AppId=${AppId}`
      );
      const subCategoryName = response?.data?.data?.[0]?.SubCategoryName;
      if (subCategoryName?.toLowerCase() == 'wholesale') {
        sessionStore('AppType', 'Wholesale');
        return import('./Pages/AppPage/WholesaleAppPage.jsx');
      } else {
        sessionStore('AppType', 'Sale');
        return import('./Pages/AppPage/AppPage.jsx');
      }
    }
  } catch (error) {
    console.error('API call failed:', error);
    return null; // Return null in case of error
  }
};
const fetchHomeComponent = async () => {
  try {
    //  sessionStore('AppId', 82);
    // sessionStore('BranchId', 404);
    // sessionStore('AppName', 'Sports');
    // sessionStore('CompId', 256);
    // sessionStore('MobileNo', '9698838966');
    // sessionStore('UserType', 'Admin');
    // sessionStore('UserId', 3128);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTY5ODgzODk2NiIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY3OTg0OTk1LCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.dbwbvmzkddUYIDrLif1jKC8n5ZiOUqpWdW1Xeq1tGuc'
    // );
    // sessionStore('AppId', 104);
    // sessionStore('BranchId', 817);
    // sessionStore('AppName', 'Sports');
    // sessionStore('CompId', 678);
    // sessionStore('MobileNo', '9698838966');
    // sessionStore('UserType', 'Admin');
    // sessionStore('UserId', 2257);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTY5ODgzODk2NiIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLXJldGFpbC1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLWNvbW1vbi1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLXNtcy1lbWFpbC10ZW1wbGF0ZS1hcGkiLCJodHRwczovL2FwaS5wb3pvLmRldi9wb3pvLWNvbW1vbi1hcGkiXSwiZXhwIjoxNzY3MDQ4NjgwLCJpc3MiOiJodHRwczovL2FwaS5wb3pvLmRldi9Kd3RUb2tlbiJ9.Pi3XXzF1LmZLy8q2NDvjcK6BlUmJO4hHUAa1Rld7h6s'
    // );

    //  sessionStore('AppId', 26);
    // sessionStore('BranchId', 85);
    // sessionStore('AppName', 'Bakery');
    // sessionStore('CompId', 78);
    // sessionStore('MobileNo', '9362311570');
    // sessionStore('UserType', 'Super Admin');
    // sessionStore('UserId', 1);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //        'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MjMxMTU3MCIsIlBhc3N3b3JkIjoiWkB6OTM3MCIsImF1ZCI6WyJodHRwczovL2FwaS5wb3pvLmFwcC9wb3pvLWNvbW1vbi1hcGkiLCJodHRwczovL2FwaS5wb3pvLmFwcC9wb3pvLWNvbW1vbi1hcGktdGVzdCIsImh0dHBzOi8vYXBpLnBvem8uYXBwL3Bvem8tcmV0YWlsLWFwaSIsImh0dHBzOi8vYXBpLnBvem8uYXBwL3Bvem8tc21zLWVtYWlsLXRlbXBsYXRlLWFwaSIsImh0dHBzOi8vYXBpLnBvem8uYXBwL3Bvem8tY29tbW9uLWFwaSJdLCJleHAiOjE3NjMxOTAxMTAsImlzcyI6Imh0dHBzOi8vYXBpLnBvem8uYXBwL0p3dFRva2VuIn0.nkx5p-533gEM7Dd8J8SiTzLJrnNEMcyLp4iBdz5s8LA'
    // // );
    // sessionStore('AppId', 1);
    // sessionStore('BranchId', 121);
    // sessionStore('AppName', 'Bakery');
    // sessionStore('CompId', 72);
    // sessionStore('MobileNo', '8072329153');
    // sessionStore('UserType', 'Admin');
    // sessionStore('UserId', 39);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiODA3MjMyOTE1MyIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY3NzIzOTk0LCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.Uyham6EJoEgXqhVQFyWPPcs1cclWpWT9jedyrxOzAI4'
    // );

    // sessionStore('AppId', 1);
    // sessionStore('BranchId', 435);
    // sessionStore('AppName', 'Bakery');
    // sessionStore('CompId', 280);
    // sessionStore('MobileNo', '9360642222');
    // sessionStore('UserType', 'Admin');
    // sessionStore('UserId', 3308);
    // sessionStore('userName', 'Karthiga');
    // sessionStorage.setItem(
    //   'auth',
    //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MDY0MjIyMiIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY3OTg2MDI1LCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.bHBj3BFUflN62gdSlS6qFqL6cDlGZqOwcRBJTFB-Zy8'
    // );
    // sessionStore("AppId", 1)
    // sessionStore("BranchId", 127)
    // sessionStore("AppName", "Restaraunt")
    // sessionStore("CompId", 77)
    // sessionStore("MobileNo", "9972702376")
    // sessionStore("UserType", "Admin")
    // sessionStore("UserId", 1791)
    // sessionStore("userName", "Karthiga")
    // sessionStorage.setItem('auth', "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTk3MjcwMjM3NiIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzY1OTEyODgyLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.OxzLs_XOl61Rs-PgLdWAUiYscycnOcyckQ_QeviwpAY")
    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.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MDY0MjI0NCIsIlBhc3N3b3JkIjoiWkB6NjUzOTU0IiwiYXVkIjpbImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxMyIsImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxMiIsImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxNCIsImh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAxMyJdLCJleHAiOjE3Njk2MjY3NTcsImlzcyI6Imh0dHA6Ly8xOTIuMTY4LjEuMzc6ODAwMSJ9.Zm9iKUTOTx780VfHtgXwmdz6aYl_0oRjL5DNqo2T9pI'
    );
    const AppId = getSession('AppId');
    if (AppId) {
      const response = await axios.get(
        `${apiCommonUrl}/application?AppId=${AppId}`
      );
      const subCategoryName = response?.data?.data?.[0]?.SubCategoryName;
      if (subCategoryName?.toLowerCase() == 'wholesale') {
        sessionStore('AppType', 'Wholesale');
        return import('./Pages/DashBoard/WholesaleDashboard.jsx');
      } else {
        sessionStore('AppType', 'Sale');
        return import('./Pages/DashBoard/RetailDashboard.jsx');
      }
    }
  } catch (error) {
    console.error('API call failed:', error);
    return null; // Return null in case of error
  }
};
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',
        component: ProductCatalogueList,
        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 Category 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 Base',
      },
      {
        path: 'code-base/new',
        component: (props) => <CodeBase {...props} formType="add" />,
        empAccess: 'Code Base',
      },
      {
        path: 'code-base/new',
        component: (props) => <CodeBase {...props} formType="edit" />,
        empAccess: 'Code Base',
      },

      { 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 Based',
      },
      {
        path: 'loyalty-based/new',
        component: (props) => <LoyaltyBased {...props} formType="add" />,
        empAccess: 'Loyalty Based',
      },
      {
        path: 'loyalty-based/update',
        component: (props) => <LoyaltyBased {...props} formType="edit" />,
        empAccess: 'Loyalty Based',
      },

      {
        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: 'purchase-order',
        component: PurchaseOrderList,
        empAccess: 'Purchase Order',
      },

      {
        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/new',
        component: (props) => <PurchaseOrder {...props} formType="add" />,
        empAccess: 'Purchase Order',
      },

      {
        path: 'purchase-return/list',
        component: PurchaseReturnget,
        empAccess: 'Purchase Return',
      },
      {
        path: 'purchaseconfirm',
        component: CustomerPurchaseConfirm,
        // empAccess: 'View Bill',
      },
      {
        path: 'purchase-return',
        component: PurchaseReturn,
        empAccess: 'Purchase 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-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: 'sales-quotation/list',
        component: PurchaseQuotationList,
        empAccess: 'Sales Quotation',
      },

      { 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: 'Combo Product',
      },
      {
        path: 'combo-master/new',
        component: (props) => <ComboMaster {...props} formType="add" />,
        empAccess: 'Combo Product',
      },
      {
        path: 'combo-master/update',
        component: (props) => <ComboMaster {...props} formType="edit" />,
        empAccess: 'Combo 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 Bill Cancel',
      },
      {
        path: 'sales-bill-product-return/list',
        component: SalesBillProductsReturnList,
        empAccess: 'Product Return',
      },
      {
        path: 'sales-bill-product-return',
        component: SalesBillProductsReturn,
        empAccess: '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',
      },
    ],
  },
];
