File size: 2,781 Bytes
1955a0f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { LayoutDashboard, Megaphone, Users, Mail, Flame, Inbox, Webhook, BarChart2, Building2, CreditCard, Settings, Zap, Boxes, LucideIcon } from "lucide-react";
import { MINT_THEME, PROD_THEME, ThemeConfig } from "../context/ThemeContext";

export type ModuleId = "e" | "s";

export interface ModuleNavItem {
  name: string;
  path: string; // relative to the module namespace, e.g. "" for index, "campaigns"
  icon: LucideIcon;
}

export interface ModuleDefinition {
  id: ModuleId;
  /** Menu label, e.g. "Module E" */
  label: string;
  /** Logo wordmark, e.g. "ModuleE" */
  wordmark: string;
  /** Route namespace: /modules/e */
  basePath: string;
  icon: LucideIcon;
  theme: ThemeConfig;
  /** Short capability line shown on the hub cards */
  blurb: string;
  /** Engine label shown in the TopBar telemetry strip */
  engineLabel: string;
  nav: ModuleNavItem[];
}

const SHARED_NAV: ModuleNavItem[] = [
  { name: "Campaigns", path: "campaigns", icon: Megaphone },
  { name: "Leads", path: "leads", icon: Users },
  { name: "Email Accounts", path: "email-accounts", icon: Mail },
  { name: "Warmup", path: "warmup", icon: Flame },
  { name: "Unified Inbox", path: "inbox", icon: Inbox },
  { name: "Webhooks", path: "webhooks", icon: Webhook },
  { name: "Analytics", path: "analytics", icon: BarChart2 },
  { name: "Clients", path: "clients", icon: Building2 },
  { name: "Settings", path: "settings", icon: Settings },
];

export const MODULES: Record<ModuleId, ModuleDefinition> = {
  e: {
    id: "e",
    label: "Module E",
    wordmark: "ModuleE",
    basePath: "/modules/e",
    icon: Zap,
    theme: MINT_THEME,
    blurb: "Autonomous cold outreach infrastructure, sequence management, unified inbox, email warmup, and deliverability command center.",
    engineLabel: "ModuleE Engine",
    nav: [
      { name: "Command Center", path: "", icon: LayoutDashboard },
      ...SHARED_NAV.slice(0, 8),
      { name: "Pricing", path: "pricing", icon: CreditCard },
      { name: "Settings", path: "settings", icon: Settings },
    ],
  },
  s: {
    id: "s",
    label: "Module S",
    wordmark: "ModuleS",
    basePath: "/modules/s",
    icon: Boxes,
    theme: PROD_THEME,
    blurb: "Advanced campaign management, sequences, unified inbox, email warmup, lead database, analytics, and webhook automation.",
    engineLabel: "ModuleS Engine",
    nav: [
      { name: "Dashboard", path: "", icon: LayoutDashboard },
      ...SHARED_NAV,
    ],
  },
};

export const MODULE_IDS: ModuleId[] = ["e", "s"];

export function moduleHref(id: ModuleId, path = ""): string {
  const base = MODULES[id].basePath;
  return path ? `${base}/${path}` : base;
}

export function isModuleId(value: string | undefined): value is ModuleId {
  return value === "e" || value === "s";
}