"use client"
import type { NavGroup } from "@/base/types/navigation"
import {
AlarmClockIcon,
AwardIcon,
BanknoteArrowDownIcon,
BarChart3Icon,
BellRingIcon,
BookIcon,
BriefcaseBusinessIcon,
Building2Icon,
CalendarCheck2Icon,
CalendarDaysIcon,
LayoutDashboardIcon,
ClipboardListIcon,
UsersIcon,
CalendarIcon,
CarIcon,
ClipboardCheckIcon,
Clock3Icon,
ClockIcon,
GemIcon,
GitBranchIcon,
HandCoinsIcon,
ListIcon,
ListTodoIcon,
MegaphoneIcon,
PackageIcon,
PhoneCallIcon,
PlugZapIcon,
ReceiptIcon,
ReceiptTextIcon,
SettingsIcon,
ShoppingBasketIcon,
CircleDollarSign,
StarIcon,
StoreIcon,
TimerIcon,
UserCogIcon,
WalletIcon,
WrenchIcon,
ShoppingCartIcon,
} from "lucide-react"
import Image from "next/image"
import { DashboardLayout } from "@/base/components/layout/dashboard"
import { useAuth } from "@/shared/hooks/use-auth"
const navGroups: NavGroup[] = [
{
items: [
{
title: "Dashboard",
href: "/",
icon: ,
},
{
title: "Job Cards",
href: "/sales/workorder/list",
icon: ,
},
{
title: "Customer & Vehicles",
href: "/customer-vehicles",
icon: ,
},
{
title: "Reports",
href: "/reports",
icon: ,
},
],
},
{
label: "Management",
items: [
{
title: "Calendars",
href: "/calendars",
icon: ,
items: [
{ title: "Work Schedule", href: "/calendar/work-schedule/list", icon: },
{ title: "Appointments", href: "/calendar/appointment/list", icon: },
],
},
{
title: "Sales",
href: "/sales",
icon: ,
items: [
{ title: "Customers", href: "/sales/customers", icon: },
{ title: "Vehicles", href: "/sales/vehicles", icon: },
{ title: "Inspections", href: "/sales/inspections", icon: },
{ title: "Estimates", href: "/sales/estimate", icon: },
{ title: "Job Cards", href: "/sales/workorder/list", icon: },
{ title: "Invoices", href: "/sales/invoice", icon: },
{ title: "Payments Received", href: "/sales/payment-received", icon: },
{ title: "Credit Notes", href: "/sales/credit-notes", icon: },
],
},
{
title: "Purchases",
href: "/purchases",
icon: ,
items: [
{ title: "Vendors", href: "/purchase/vendor", icon: },
{ title: "Expenses", href: "/purchase/expense", icon: },
{ title: "Purchase Orders", href: "/purchase/purchase-order", icon: },
{ title: "Bills", href: "/purchase/bill", icon: },
{ title: "Payments Made", href: "/purchase/payments-made", icon: },
{ title: "Vendor Credits", href: "/purchase/vendor-credit", icon: },
],
},
{
title: "CRM",
href: "/crm",
icon: ,
items: [
{ title: "Leads", href: "/crm/leads/list", icon: },
{ title: "Calls", href: "/crm/calls-follow-up/list", icon: },
{ title: "Tasks", href: "/crm/tasks/list", icon: },
],
},
{
title: "Marketing",
href: "/marketing",
icon: ,
items: [
{ title: "Service Reminders", href: "/marketing/service-reminder/list", icon: },
{ title: "Rating & Reviews", href: "/marketing/rating-review", icon: },
{ title: "Google Business Reviews", href: "/marketing/google-rating-review", icon: },
],
},
{
title: "Accountants",
href: "/accountants",
icon: ,
items: [
{ title: "Manual Journals", href: "/accountants/manual-journal", icon: },
{ title: "Chart of Accounts", href: "/accountants/chart-of-account", icon: },
],
},
{
title: "Employees",
href: "/productivity",
icon: ,
items: [
{ title: "Employees", href: "/productivity/employees", icon: },
{ title: "Time Clocks", href: "/productivity/time-clocks", icon: },
{ title: "Time Sheets", href: "/productivity/timesheet", icon: },
{ title: "Payroll", href: "/productivity/payroll", icon: },
{ title: "Payments Made", href: "/productivity/employee-payments-made", icon: },
{ title: "Shop Calendars", href: "/productivity/shop-calendars", icon: },
{ title: "Shop Timing", href: "/productivity/shop-timings", icon: },
{ title: "Holidays", href: "/productivity/holidays", icon: },
],
},
{
title: "Items",
href: "/items",
icon: ,
items: [
{ title: "Services", href: "/items/services", icon: },
{ title: "Parts", href: "/items/parts", icon: },
{ title: "Expense Item", href: "/items/expense-item", icon: },
{ title: "Service Group", href: "/items/service-group", icon: },
{ title: "Inspections", href: "/items/inspection", icon: },
{ title: "Inventory Adjustments", href: "/items/adjustment", icon: },
],
},
{
title: "Settings",
href: "/setting",
icon: ,
items: [
{ title: "Company", href: "/setting/company", icon: },
{ title: "Shop Types", href: "/setting/shop-type", icon: },
{ title: "Tax & Rates", href: "/setting/tax-rates", icon: },
{ title: "Configurations", href: "/setting/configurations/preferences/sales", icon: },
{ title: "Templates", href: "/setting/templates", icon: },
{ title: "Integrations", href: "/setting/integrations/providers", icon: },
{ title: "Master", href: "/setting/master/body-type", icon: },
],
},
],
},
]
function Logo() {
return (
)
}
export default function AuthenticatedLayout({
children,
}: {
children: React.ReactNode
}) {
const { user } = useAuth()
const userInfo = user
? {
name: user.name,
email: user.email,
initials: user.name.charAt(0).toUpperCase(),
}
: undefined
return (
} user={userInfo}>
{children}
)
}