"use client"
import { ArrowUpRight, Terminal, X } from "lucide-react"
import { useEffect, useState } from "react"
import { useDictionary } from "@/hooks/use-dictionary"
import { getAssetUrl } from "@/lib/base-path"
import { STORAGE_KEYS } from "@/lib/storage"
import { cn } from "@/lib/utils"
const MCP_URL =
"https://github.com/DayuanJiang/next-ai-draw-io/tree/main/packages/mcp-server"
/**
* Whether the user closed the MCP notice once. Starts as closed so the server
* render and the first client render agree; the stored choice is read after
* mount.
*/
function useVideoClosed() {
const [closed, setClosed] = useState(true)
useEffect(() => {
setClosed(localStorage.getItem(STORAGE_KEYS.mcpVideoClosed) === "true")
}, [])
const close = () => {
localStorage.setItem(STORAGE_KEYS.mcpVideoClosed, "true")
setClosed(true)
}
return [closed, close] as const
}
function PromoVideo({ className }: { className?: string }) {
return (
)
}
function CloseButton({ onClick }: { onClick: () => void }) {
const dict = useDictionary()
return (
)
}
/** Icon, title and tagline of the MCP server, linking to its README */
function NoticeLink({ className }: { className?: string }) {
const dict = useDictionary()
return (