import IconLayout from '../Icons/IconLayout'; import IconHuggy from '../Icons/IconHuggy'; import IconImage from '../Icons/IconImage'; import IconText from '../Icons/IconText'; import LayoutSelector from '../Layout/LayoutSelector'; import HuggyMenu from './HuggyMenu'; import { LayoutType } from '../../types/canvas.types'; import { Huggy } from '../../data/huggys'; interface SidebarProps { onLayoutClick: () => void; onHuggyClick: () => void; onImageClick: () => void; onTextClick: () => void; onSelectLayout: (layoutId: LayoutType) => void; onSelectHuggy: (huggy: Huggy) => void; activeButton: 'layout' | 'huggy' | 'image' | 'text' | null; } export default function Sidebar({ onLayoutClick, onHuggyClick, onImageClick, onTextClick, onSelectLayout, onSelectHuggy, activeButton }: SidebarProps) { return (
{ e.preventDefault(); e.stopPropagation(); }} onDrag={(e) => { e.preventDefault(); e.stopPropagation(); }} onDragOver={(e) => { e.preventDefault(); e.stopPropagation(); }} >
{/* Layout Button */} {/* Huggy Button */} {/* Image Button */} {/* Text Button */} {/* Layout Selector - positioned absolutely, aligned with Layout button */} {activeButton === 'layout' && ( )} {/* Huggy Menu - positioned absolutely next to sidebar */} {activeButton === 'huggy' && ( onHuggyClick()} /> )} {/* Text Hint Box - positioned absolutely, aligned with Text button */} {activeButton === 'text' && (

Click anywhere on the
canvas to add texts

)}
); }