'use client';
import { useState } from 'react';
import { FiList, FiChevronRight } from 'react-icons/fi';
import { PostToc } from './post-toc';
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function PostLayout({ children, hasToc = true, contentKey }: { children: React.ReactNode; hasToc?: boolean; contentKey?: string }) {
const [isTocOpen, setIsTocOpen] = useState(hasToc);
return (
{/* Main Content Area */}
{/* Desktop Sidebar (TOC) */}
{/* Mobile TOC Overlay */}
{isTocOpen && hasToc && (
)}
{/* Toggle Button (Glassmorphism Pill) */}
{hasToc && (
)}
);
}