import { useParams } from 'common' import { ArrowUpRight, BookOpen, LayoutGrid, PlusSquare } from 'lucide-react' import Link from 'next/link' import { useRouter } from 'next/router' import { cn } from 'ui' import { useInstalledIntegrations } from '@/components/interfaces/Integrations/Landing/useInstalledIntegrations' import { DOCS_URL } from '@/lib/constants' const sectionLabelCls = 'px-2 pt-4 pb-1.5 font-mono text-xs uppercase tracking-wider text-foreground-lighter' interface SidebarLinkProps { href: string active?: boolean icon?: React.ReactNode label: React.ReactNode count?: number | string className?: string } const SidebarLink = ({ href, active, icon, label, count, className }: SidebarLinkProps) => ( {icon} {label} {count !== undefined && ( {count} )} ) const HELP_LINKS: Array<{ icon: React.ReactNode; label: string; href: string }> = [ { icon: , label: 'Integrations docs', href: `${DOCS_URL}/guides/integrations`, }, { icon: , label: 'Build an integration', href: `${DOCS_URL}/guides/integrations/build-a-briven-oauth-integration`, }, ] export const MarketplaceSidebar = () => { const router = useRouter() const { ref } = useParams() const { installedIntegrations } = useInstalledIntegrations() const baseHref = `/project/${ref}/integrations` const isDiscoverActive = router.pathname === '/project/[ref]/integrations' && !router.query.type && !router.query.source const activeIntegrationId = typeof router.query.id === 'string' ? router.query.id : undefined return ( ) }