import "./components/ui/tidal.css"; import { useState, type MouseEvent } from "react"; import { TidalFooterProducts, type TidalFooterProduct, type TidalFooterProductsNavGroup } from "./components/ui/footer-products"; import "./components/ui/footer-products.css"; const products: readonly TidalFooterProduct[] = [ { id: "components", name: "TidalUI Components", shortDescription: "Reusable React primitives for interface teams.", href: "#preview-components", auxiliary: { id: "components-docs", label: "Read docs", href: "#preview-components-docs", }, }, { id: "blocks", name: "TidalUI Blocks", shortDescription: "Complete sections for product and marketing surfaces.", href: "#preview-blocks", auxiliary: { id: "blocks-docs", label: "View block docs", href: "#preview-blocks-docs", }, }, { id: "guides", name: "TidalUI Guides", shortDescription: "Reference pages for installation and component APIs.", href: "#preview-guides", auxiliary: { id: "guides-start", label: "Start reading", href: "#preview-guides-start", }, }, ]; const navigationGroups: readonly TidalFooterProductsNavGroup[] = [ { id: "company", title: "Company", links: [ { id: "about", label: "About", href: "#preview-about" }, { id: "contact", label: "Contact", href: "#preview-contact" }, ], }, { id: "resources", title: "Resources", links: [ { id: "docs", label: "Documentation", href: "#preview-docs" }, { id: "changelog", label: "Changelog", href: "#preview-changelog" }, ], }, ]; 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 FooterProductsDemo() { const [status, setStatus] = useState("No preview destination selected."); const previewProducts = products.map((product) => ({ ...product, linkProps: { ...product.linkProps, onClick: handlePreviewClick(String(product.name), setStatus), }, auxiliary: product.auxiliary ? { ...product.auxiliary, linkProps: { ...product.auxiliary.linkProps, onClick: handlePreviewClick( String(product.auxiliary.label), setStatus, ), }, } : undefined, })); const previewNavigationGroups = navigationGroups.map((group) => ({ ...group, links: group.links.map((link) => ({ ...link, onClick: handlePreviewClick(String(link.label), setStatus), })), })); return ( TidalUI } eyebrow="A small product suite" heading="Built for your next project." description="Components, complete sections and practical guides." products={previewProducts} navigationGroups={previewNavigationGroups} legal={© 2026 TidalUI preview} status={{status}} /> ); } export default function AgentExample() { return (
); }