import * as React from 'react'; import { cn } from '../../shared/utils'; /** * A single link rendered inside a footer column or the legal links row. */ export interface MarketingFooterLink { label: string; href: string; } /** * A labeled group of links rendered as one column of the footer. */ export interface MarketingFooterColumn { heading: string; links: MarketingFooterLink[]; } export interface MarketingFooterProps { /** Logo slot — pass a rendered logo element (e.g. ``). */ logo: React.ReactNode; /** Short description shown under the logo in the first column. */ tagline?: string; /** Link columns rendered alongside the logo column. */ columns: MarketingFooterColumn[]; /** Small print links (Privacy, Terms, etc.) shown on the bottom row. */ legalLinks?: MarketingFooterLink[]; /** Copyright text shown on the bottom row. */ copyright?: string; className?: string; } /** Maps logo column + link columns to a static grid-cols class so Tailwind's JIT scanner can find it (capped at 6). */ const gridColsClasses: Record = { 2: 'md:grid-cols-2', 3: 'md:grid-cols-3', 4: 'md:grid-cols-4', 5: 'md:grid-cols-5', 6: 'md:grid-cols-6', }; /** * Multi-column site footer for public marketing pages. * * @description * Pairs with `MarketingNavbar` to bookend a marketing page: a logo/tagline * cell followed by an arbitrary number of link columns, plus a bottom bar * with copyright and legal links. * * @ai-rules * 1. Pass the logo as a rendered node via the `logo` prop — do not couple this file to any specific logo component. * 2. Pass at most 5 `columns` — the logo cell plus columns are capped at a 6-column desktop grid. * 3. `legalLinks` and `copyright` are optional; the bottom row still renders with just whichever is provided. */ export function MarketingFooter({ logo, tagline, columns, legalLinks, copyright, className, }: MarketingFooterProps) { const resolvedCols = Math.min(Math.max(columns.length + 1, 2), 6); return ( ); }