'use client'; import { ReactNode } from 'react'; import Link from 'next/link'; import { usePathname, useSearchParams } from 'next/navigation'; interface ImportTab { id: string; label: string; href: string; description: string; } interface ImportLayoutContentProps { children: ReactNode; title: string; description?: string; } const importTabs: ImportTab[] = [ { id: 'manual', label: 'Manual Entry', href: '/add-story', description: 'Add a story by manually entering details' }, { id: 'url', label: 'Import from URL', href: '/import', description: 'Import a single story from a website' }, { id: 'epub', label: 'Import EPUB', href: '/import/epub', description: 'Import a story from an EPUB file' }, { id: 'bulk', label: 'Bulk Import', href: '/import/bulk', description: 'Import multiple stories from URLs' } ]; export default function ImportLayoutContent({ children, title, description }: ImportLayoutContentProps) { const pathname = usePathname(); const searchParams = useSearchParams(); // Determine active tab based on current path const activeTab = importTabs.find(tab => { if (tab.href === pathname) return true; if (tab.href === '/import' && pathname === '/import') return true; return false; }); return ( <>

{title}

{description && (

{description}

)}
← Back to Library
{/* Import Method Tabs */}
{/* Tab Content */}
{children}
); }