{"version":3,"sources":["../src/MarketingNav.tsx"],"sourcesContent":["'use client';\n\nimport Link from 'next/link';\nimport { usePathname } from 'next/navigation';\nimport { Menu, X } from 'lucide-react';\nimport { useState } from 'react';\nimport type { MarketingNavProps, NavLink } from './types';\nimport { cx } from './utils';\nimport { Button } from './components/ui/button';\n\nconst DEFAULT_NAV_LINKS: NavLink[] = [\n  { href: '/features', label: 'Features' },\n  { href: '/pricing', label: 'Pricing' },\n  { href: '/docs', label: 'Docs' },\n];\n\n/**\n * The Forjio family marketing navbar. Identical chrome across every\n * product — what changes is the brand icon + wordmark and (rarely) the\n * link set. Color comes from CSS vars (`--primary`, `--foreground`,\n * `--border`, `--background`) so each product's globals.css can recolor\n * without touching this file.\n */\nexport function MarketingNav({\n  brandIcon,\n  brandName,\n  navLinks = DEFAULT_NAV_LINKS,\n  homeHref = '/',\n  loginHref = '/login',\n  ctaHref = '/signup',\n  ctaLabel = 'Get Started',\n  loginLabel = 'Log in',\n  menuLabel = 'Toggle navigation menu',\n  localeSlot,\n  localeBar,\n  rightSlot,\n}: MarketingNavProps) {\n  const pathname = usePathname();\n  const [mobileOpen, setMobileOpen] = useState(false);\n\n  return (\n    <>\n      {/* Phone: a thin bar ABOVE the header, mirroring the footer's\n          preferences row — bang's call over both the menu panel (a choice\n          behind a tap is as buried as one behind Settings) and squeezing\n          the controls in beside the hamburger. Desktop keeps them in the\n          nav cluster, so each is hidden where the other applies and the\n          duplicate never both render.\n\n          The typography is the footer row's, not the navbar's: 12px muted\n          with room for an uppercase label, so the two preference rows on a\n          page look like the same control in two places. `localeBar` carries\n          the label; `localeSlot` is the pre-0.8.0 fallback. */}\n      {(localeBar ?? localeSlot) && (\n        <div className=\"border-b border-border/50 bg-background/80 md:hidden\">\n          <div className=\"mx-auto flex max-w-7xl flex-wrap items-center gap-3 px-4 py-3 text-xs text-muted-foreground\">\n            {localeBar ?? localeSlot}\n          </div>\n        </div>\n      )}\n      <nav className=\"border-b border-border/50 bg-background/80 backdrop-blur-sm\">\n        <div className=\"mx-auto flex max-w-7xl items-center justify-between px-4 py-4 md:px-6\">\n          <div className=\"flex items-center gap-8\">\n            <Link href={homeHref} className=\"flex items-center gap-2\">\n              {brandIcon}\n              <span className=\"text-lg font-bold tracking-tight\">{brandName}</span>\n            </Link>\n            <div className=\"hidden items-center gap-6 md:flex\">\n              {navLinks.map((link) => (\n                <Link\n                  key={link.href}\n                  href={link.href}\n                  className={cx(\n                    'text-sm transition-colors',\n                    pathname === link.href\n                      ? 'text-foreground'\n                      : 'text-muted-foreground hover:text-foreground'\n                  )}\n                >\n                  {link.label}\n                </Link>\n              ))}\n            </div>\n          </div>\n\n          <div className=\"hidden items-center gap-4 md:flex\">\n            {localeSlot}\n            {rightSlot ?? (\n              <>\n                {loginHref && (\n                  <Link\n                    href={loginHref}\n                    className=\"text-sm text-muted-foreground hover:text-foreground\"\n                  >\n                    {loginLabel}\n                  </Link>\n                )}\n                <Button asChild className=\"shadow-none\">\n                  <Link href={ctaHref}>{ctaLabel}</Link>\n                </Button>\n              </>\n            )}\n          </div>\n\n          <button\n            onClick={() => setMobileOpen(!mobileOpen)}\n            className=\"md:hidden\"\n            aria-label={menuLabel}\n          >\n            {mobileOpen ? <X className=\"h-5 w-5\" /> : <Menu className=\"h-5 w-5\" />}\n          </button>\n        </div>\n\n        {mobileOpen && (\n          <div className=\"border-t border-border/50 px-6 py-4 md:hidden\">\n            <div className=\"flex flex-col gap-3\">\n              {navLinks.map((link) => (\n                <Link\n                  key={link.href}\n                  href={link.href}\n                  onClick={() => setMobileOpen(false)}\n                  className={cx(\n                    'text-sm transition-colors',\n                    pathname === link.href\n                      ? 'text-foreground'\n                      : 'text-muted-foreground hover:text-foreground'\n                  )}\n                >\n                  {link.label}\n                </Link>\n              ))}\n              <div className=\"mt-2 flex flex-col gap-2 border-t border-border/50 pt-4\">\n                {rightSlot ?? (\n                  <>\n                    {loginHref && (\n                      <Link\n                        href={loginHref}\n                        onClick={() => setMobileOpen(false)}\n                        className=\"text-sm text-muted-foreground hover:text-foreground\"\n                      >\n                        {loginLabel}\n                      </Link>\n                    )}\n                    <Button asChild className=\"w-full shadow-none\">\n                      <Link href={ctaHref} onClick={() => setMobileOpen(false)}>\n                        {ctaLabel}\n                      </Link>\n                    </Button>\n                  </>\n                )}\n              </div>\n            </div>\n          </div>\n        )}\n      </nav>\n    </>\n  );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuDU;AArDV,kBAAiB;AACjB,wBAA4B;AAC5B,0BAAwB;AACxB,mBAAyB;AAEzB,mBAAmB;AACnB,oBAAuB;AAEvB,MAAM,oBAA+B;AAAA,EACnC,EAAE,MAAM,aAAa,OAAO,WAAW;AAAA,EACvC,EAAE,MAAM,YAAY,OAAO,UAAU;AAAA,EACrC,EAAE,MAAM,SAAS,OAAO,OAAO;AACjC;AASO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,WAAW;AAAA,EACX,aAAa;AAAA,EACb,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AACF,GAAsB;AACpB,QAAM,eAAW,+BAAY;AAC7B,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAS,KAAK;AAElD,SACE,4EAYI;AAAA,kBAAa,eACb,4CAAC,SAAI,WAAU,wDACb,sDAAC,SAAI,WAAU,+FACZ,uBAAa,YAChB,GACF;AAAA,IAEF,6CAAC,SAAI,WAAU,+DACb;AAAA,mDAAC,SAAI,WAAU,yEACb;AAAA,qDAAC,SAAI,WAAU,2BACb;AAAA,uDAAC,YAAAA,SAAA,EAAK,MAAM,UAAU,WAAU,2BAC7B;AAAA;AAAA,YACD,4CAAC,UAAK,WAAU,oCAAoC,qBAAU;AAAA,aAChE;AAAA,UACA,4CAAC,SAAI,WAAU,qCACZ,mBAAS,IAAI,CAAC,SACb;AAAA,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