import "./components/ui/tidal.css"; import { useState, type MouseEvent } from "react"; import { TidalFooterDocumentation, type TidalFooterDocumentationDestination, type TidalFooterDocumentationLink } from "./components/ui/footer-documentation"; import "./components/ui/footer-documentation.css"; const previous: TidalFooterDocumentationDestination = { id: "install", label: "Install the package", description: "Package setup and local configuration.", href: "#preview-install", }; const next: TidalFooterDocumentationDestination = { id: "accessibility", label: "Accessibility checklist", description: "Keyboard, focus, and semantic checks.", href: "#preview-accessibility", }; const documentationLinks: readonly TidalFooterDocumentationLink[] = [ { id: "components", label: "Components", href: "#preview-components" }, { id: "guides", label: "Guides", href: "#preview-guides" }, { id: "api", label: "API reference", href: "#preview-api" }, { id: "changelog", label: "Changelog", href: "#preview-changelog" }, ]; const contactLinks: readonly TidalFooterDocumentationLink[] = [ { id: "support", label: "Support", href: "#preview-support" }, { id: "contact", label: "Contact", href: "#preview-contact" }, ]; function handlePreviewClick( label: string, setStatus: (status: string) => void, ) { return (event: MouseEvent) => { if ( event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey ) { return; } event.preventDefault(); setStatus(`${label} selected in this local preview.`); }; } export function FooterDocumentationDemo() { const [status, setStatus] = useState("No preview destination selected."); const previewPrevious = { ...previous, linkProps: { onClick: handlePreviewClick(String(previous.label), setStatus), }, }; const previewNext = { ...next, linkProps: { onClick: handlePreviewClick(String(next.label), setStatus) }, }; const previewDocumentationLinks = documentationLinks.map((link) => ({ ...link, onClick: handlePreviewClick(String(link.label), setStatus), })); const previewContactLinks = contactLinks.map((link) => ({ ...link, onClick: handlePreviewClick(String(link.label), setStatus), })); return ( TidalUI } eyebrow="Documentation" heading="Continue reading." description="Guides, references and support for your next step." version="v1.0" versionLabel="Version" adjacentLabel="Adjacent documentation" previous={previewPrevious} next={previewNext} documentationLinks={previewDocumentationLinks} contactLinks={previewContactLinks} legal={© 2026 TidalUI preview} status={{status}} /> ); } export default function AgentExample() { return (
); }