import { defineRoutes } from "@sirou/core";

export const routes = defineRoutes({
  // Root and Layouts
  root: {
    path: "/",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "(tabs)": {
    path: "/(tabs)",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  // Tabs
  "(tabs)/index": {
    path: "/(tabs)/index",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "(tabs)/payments": {
    path: "/(tabs)/payments",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "(tabs)/scan": {
    path: "/(tabs)/scan",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "(tabs)/proforma": {
    path: "/(tabs)/proforma",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "(tabs)/news": {
    path: "/(tabs)/news",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  history: {
    path: "/history",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  help: {
    path: "/help",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "Help & Support" },
  },
  faq: {
    path: "/faq",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "FAQ" },
  },
  privacy: {
    path: "/privacy",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "Privacy Policy" },
  },
  terms: {
    path: "/terms",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "Terms of Service" },
  },
  // Stacks
  "proforma/[id]": {
    path: "/proforma/:id",
    params: { id: "string" },
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "proforma/create": {
    path: "/proforma/create",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "proforma/edit": {
    path: "/proforma/edit",
    params: { id: "string" },
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "payments/[id]": {
    path: "/payments/:id",
    params: { id: "string" },
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "payment-requests/create": {
    path: "/payment-requests/create",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "invoices/[id]": {
    path: "/invoices/:id",
    params: { id: "string" },
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "invoices/create": {
    path: "/invoices/create",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "invoices/edit": {
    path: "/invoices/edit",
    params: { id: "string" },
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "news/[id]": {
    path: "/news/:id",
    params: { id: "string" },
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "notifications/index": {
    path: "/notifications/index",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "notifications/settings": {
    path: "/notifications/settings",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "reports/index": {
    path: "/reports/index",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "documents/index": {
    path: "/documents/index",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  profile: {
    path: "/profile",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "edit-profile": {
    path: "/edit-profile",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "Edit Profile" },
  },
  settings: {
    path: "/settings",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  "sms-scan": {
    path: "/sms-scan",
    guards: ["auth"],
    meta: { requiresAuth: true },
  },
  company: {
    path: "/company",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "Company" },
  },
  "company-details": {
    path: "/company/details",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "Company details" },
  },
  "user/create": {
    path: "/user/create",
    guards: ["auth"],
    meta: { requiresAuth: true, title: "Add User" },
  },
  // Public
  login: {
    path: "/login",
    guards: ["guest"],
    meta: { requiresAuth: false, guestOnly: true },
  },
  otp: {
    path: "/otp",
    params: { phone: "string", verificationId: "string" },
    guards: ["guest"],
    meta: { requiresAuth: false, guestOnly: true },
  },
  register: {
    path: "/register",
    guards: ["guest"],
    meta: { requiresAuth: false, guestOnly: true },
  },
});

export type AppRoutes = typeof routes;
