"use client"; import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react"; import { useTranslations } from "next-intl"; import { useMemo } from "react"; import { BlockNoteEditorContainer } from "../../../../components"; import { Button } from "../../../../shadcnui"; import { SectionHeader } from "../../../../components/typography"; import { HowToInterface } from "../../data/HowToInterface"; import { calculateReadingTime, extractHeadings } from "../../utils/blocknote"; type HowToCommandViewerProps = { howTo: HowToInterface; onBack: () => void; onStartChat?: () => void; }; export default function HowToCommandViewer({ howTo, onBack, onStartChat }: HowToCommandViewerProps) { const t = useTranslations(); const readingTime = useMemo(() => calculateReadingTime(howTo.description), [howTo.description]); const headings = useMemo(() => extractHeadings(howTo.description), [howTo.description]); return (