"use client" import { Check } from "lucide-react" import { useEffect, useState } from "react" import { Dialog, DialogContent, DialogTitle } from "@ui/components/dialog" import { cn } from "@lib/utils" import { SlackMark } from "@/components/brain-connector-icons" import { cardStyle, tileStyle } from "@/components/brain-home/connections-board" import { analytics } from "@/lib/analytics" import { COMPANY_BRAIN_CAL_HREF } from "@/lib/cal" import { dmSans125ClassName, dmSansClassName } from "@/lib/fonts" const BACKEND = process.env.NEXT_PUBLIC_BACKEND_URL ?? "https://api.supermemory.ai" const dismissKey = (orgId: string) => `sm_brain_setup_modal_dismissed:${orgId}` const CALL_FEATURES = [ "We install Slack with you, live", "Connect Gmail, Notion, Linear and the rest", "Wire up plugins and answer your questions", ] export function BrainSetupModal({ enabled, orgId, }: { enabled: boolean orgId: string | undefined }) { const [open, setOpen] = useState(false) useEffect(() => { // Also closes if the org stops being eligible while the dialog is open. if (!enabled || !orgId) { setOpen(false) return } let dismissed = false try { dismissed = localStorage.getItem(dismissKey(orgId)) === "1" } catch {} if (dismissed) return setOpen(true) analytics.brainSetupModalSeen() }, [enabled, orgId]) const close = () => { setOpen(false) if (!orgId) return try { localStorage.setItem(dismissKey(orgId), "1") } catch {} } return ( !next && close()}> Get set up

Get set up

Your brain is ready. Let's get it working where your team is.

Fastest

Setup call

Do it with us

30 minutes, live with our team. You leave with a working brain.

    {CALL_FEATURES.map((feature) => (
  • {feature}
  • ))}
{ analytics.brainSetupCallClicked({ surface: "setup_modal" }) analytics.brainSetupModalPicked({ choice: "call" }) close() }} className={cn( dmSans125ClassName(), "mt-5 flex h-11 items-center justify-center rounded-[10px] bg-white text-[14px] font-semibold text-[#1D1C1D] transition-transform hover:scale-[1.01]", )} > Book a setup call

Add to Slack

Rather set it up yourself? Takes a minute.

{ analytics.brainSetupModalPicked({ choice: "slack" }) close() }} className={cn( dmSans125ClassName(), "flex w-[88px] shrink-0 items-center justify-center rounded-full bg-[#0D121A] px-3 py-1.5 text-[12px] font-medium text-[#fafafa] shadow-[inset_1.5px_1.5px_4.5px_rgba(0,0,0,0.7)] transition-opacity hover:opacity-80", )} > Install
) }