import React from "react";
import { BrowserRouter as Router,Routes, Route } from "react-router-dom";
import Layout from "./components/Layout2.jsx";
import Login from "./pages/Login.jsx";
import LoginAssets from "./assets/pages/login.jsx";
import BasePositiva from "./pages/BasePositiva.jsx";
import Sifen from "./pages/Sifen.jsx";
import NotFound from "./pages/NotFound.jsx";
import RoomManagement from "./pages/Settings/RoomsManagement.jsx";
//Submenú de Dashboard
import Income from "./pages/Dashboard/Income.jsx";
import Employees from "./pages/Employees.jsx";
import Contracts from "./pages/Contracts.jsx";
import HotelPL from "./pages/Dashboard/HotelPL.jsx";
import RestaurantPL from "./pages/Dashboard/RestaurantPL.jsx";
import RestaurantAnalysis from "./pages/Dashboard/RestaurantAnalysis.jsx";
import Budget from "./pages/Dashboard/Budget.jsx";
import CostPerRoom from "./pages/Dashboard/CostPerRoom.jsx";
import Expenses from "./pages/Dashboard/Expenses.jsx";
import RoomAnalysis from "./pages/Dashboard/RoomAnalysis.jsx";
//Submenú de Expenses to be approved
import PendingApproval from "./pages/PendingApproval.jsx";
import Approved from "./pages/ExpensesToBeApproval/Approved.jsx";
import Rejected from "./pages/ExpensesToBeApproval/Rejected.jsx";
//Submenú de Expenses
import ReportExpense from "./pages/Expenses/ReportExpense.jsx";
import Payments from "./pages/Expenses/Payments.jsx";
import MonthlyPayments from "./pages/Expenses/MonthlyPayments.jsx";
import MonthlyReport from "./pages/Expenses/MonthlyReport.jsx";
import ExpenseDetail from "./pages/Expenses/ExpenseDetail.jsx";
import EditExpense from "./pages/Expenses/EditExpense.jsx";
import NewExpense from "./pages/Expenses/NewExpense.jsx";
import PurchaseEntries from "./pages/Expenses/PurchaseEntries.jsx";
import NewSuppliers from "./pages/Expenses/NewSuppliers.jsx";
//Submenú de Inventory
import Products from "./pages/Inventory/Products.jsx";
import NewProduct from "./pages/Inventory/NewProduct.jsx";
import InventoryReport from "./pages/Inventory/InventoryReport.jsx";
import NewMonthlyPayment from "./pages/Expenses/NewMonthlyPayment.jsx";
import Outcomes from "./pages/Inventory/Outcomes.jsx";
import HousekeeperOutcomes from "./pages/Inventory/HousekeeperOutcomes.jsx";

import "./styles/global.css";
//Submenú de Hotel
import Properties from "./pages/Hotel/Properties.jsx";
import PropertyDetailPage from "./pages/Hotel/PropertiesId.jsx";

//Submenú de Payroll
import Payroll from "./pages/Payroll/Payroll.jsx";
import Settings from "./pages/Settings/Settings.jsx";
import SettingsId from "./pages/Settings/SettingsId.jsx";
import Plantillapayroll from "./pages/Payroll/Plantillapayroll.jsx";
import ContractsDetail from "./pages/Payroll/ContractsDetail.jsx";
import PayrollContract from "./pages/Payroll/PayrollContract.jsx";
import EditPayroll from "./pages/Payroll/EditPayroll.jsx";

//Submenú de Inventory

import Adjustments from "./pages/Inventory/Adjustments.jsx";
import AlterProduct from "./pages/Inventory/AlterProduct.jsx";
import PayrollAttendance from "./pages/Payroll/PayrollAttendance.jsx";
import PayrollEmployees from "./pages/Payroll/PayrollEmployees.jsx";
import PayrollNewEmployee from "./pages/Payroll/NewEmployee.jsx";

import NewIncome from "./pages/Income/NewIncome.jsx";
import IncomeReport from "./pages/Income/IncomeReport.jsx";
import DiscardProduct from "./pages/Inventory/DiscardProduct.jsx";

export default function App() {
  // const location = useLocation();
  // const isLogin = location.pathname === "/";
  return (
    <>
      {/* <Navbar /> */}
      {/**{!isLogin && <Navbar />} */}
      <Routes>
        <Route path="/" element={<Login />} />
        <Route path="/app" element={<Layout />}>
          <Route path="login" element={<LoginAssets />} />
          <Route path="base-positiva" element={<BasePositiva />} />
          <Route path="sifen" element={<Sifen />} />
          <Route path="*" element={<NotFound />} />
          <Route path="income" element={<Income/>} />
          <Route path="employees" element={<Employees />} />
          <Route path="contracts" element={<Contracts />} />
          <Route path="hotelpl" element={<HotelPL />} />
          <Route path="restaurantpl" element={<RestaurantPL />} />
          <Route path="restaurant-analysis" element={<RestaurantAnalysis />} />
          <Route path="budget" element={<Budget />} />
          <Route path="cost-per-room" element={<CostPerRoom />} />
          <Route path="room-analysis" element={<RoomAnalysis />} />
          <Route path="expenses" element={<Expenses />} />
          <Route path="new-income-report" element={<IncomeReport />} />
          <Route path="new-income-form" element={<NewIncome />} />
          <Route path="edit-income-form/:id" element={<NewIncome />} />
          <Route path="payments" element={<Payments />} />
          <Route path="pending-approval" element={<PendingApproval />} />
          <Route path="approved" element={<Approved />} />
          <Route path="rejected" element={<Rejected />} />
          <Route path="report-expense" element={<ReportExpense />} />
          <Route path="new-expense" element={<NewExpense />} />
          <Route path="monthly-payments" element={<MonthlyPayments />} />
          <Route path="expenses/edit/:id" element={<EditExpense />} />
          <Route path="expenses/:id" element={<ExpenseDetail />} />
          <Route path="purchase-entries" element={<PurchaseEntries />} />
          <Route path="products" element={<Products />} />
          <Route path="properties" element={<Properties />} />
          <Route path="payroll" element={<Payroll />} />
          <Route path="properties/:id" element={<PropertyDetailPage />} />
          <Route path="new-product" element={<NewProduct/>} />
          <Route path="inventory-report" element={<InventoryReport />} />
          <Route path="settings" element={<Settings/>} />
          <Route path="settings/room-management" element={<RoomManagement />} />
          <Route path="settings/settings-id" element={<SettingsId />} />
          <Route path="new-monthly" element={<NewMonthlyPayment/>} />
          <Route path="new-suppliers" element={<NewSuppliers/>} />
          <Route path="monthly-report" element={<MonthlyReport />} />

          <Route path="discard-product" element={<DiscardProduct />} />
          <Route path="adjustments" element={<Adjustments />} />
          <Route path="product-adjustments" element={<Adjustments />} />
          <Route path="payroll/employees" element={<PayrollEmployees />} />
          <Route path="payroll/attendance" element={<PayrollAttendance />} />
          <Route path="payroll/newemployee" element={<PayrollNewEmployee />} />
          <Route path="payroll/employee/:id" element={<PayrollNewEmployee />} />
          <Route path="payroll/contract" element={<PayrollContract />} />
          <Route path="payroll/contract/:id" element={<PayrollContract />} />
          <Route path="payroll/edit/:id" element={<EditPayroll />} />
          <Route path="payroll/:id" element={<Plantillapayroll />} />
          <Route path="payroll/contracts-detail/:id" element={<ContractsDetail />} />
          <Route path="alter-product/:id" element={<AlterProduct />} />
          <Route path="inventory/outcomes" element={<Outcomes />} />
          <Route path="housekeeper/outcomes" element={<HousekeeperOutcomes />} />
        </Route>
      </Routes>
    </>
  );
}

/* <Route path="users" element={<Users/>} />
<Route path="reportes" element={<Reportes />} />
*/
