'use client'; import { motion } from 'framer-motion'; import { useState } from 'react'; import { UISuggestion } from '@/lib/editor/suggestions'; import { CrossIcon, MessageIcon } from './icons'; import useWindowSize from './use-window-size'; import { Button } from '../ui/button'; export const Suggestion = ({ suggestion, onApply, }: { suggestion: UISuggestion; onApply: () => void; }) => { const [isExpanded, setIsExpanded] = useState(false); const { width: windowWidth } = useWindowSize(); return !isExpanded ? (