'use client' import type { ComponentType } from 'react' import type { IntegrationSection } from '@/app/components/integrations/routes' import { cn } from '@langgenius/dify-ui/cn' import Link from '@/next/link' import { buildIntegrationPath } from './routes' import { integrationSidebarActiveNavItemClassName, integrationSidebarDisabledNavItemClassName, integrationSidebarInactiveNavItemClassName, integrationSidebarNavItemClassName, } from './sidebar-nav-item-styles' type IconComponent = ComponentType<{ className?: string }> export type IntegrationSidebarNavItemData = { activeIcon?: IconComponent | string className?: string disabled?: boolean icon: IconComponent | string iconClassName?: string label: string section?: IntegrationSection stepByStepTourTarget?: string } const renderIcon = (icon: IconComponent | string, className = 'size-4') => { if (typeof icon === 'string') return const Icon = icon return } const StepByStepTourTargetAnchor = ({ target }: { target?: string }) => { if (!target) return null return (