import { getAllLayouts } from '../../data/layouts'; import { LayoutType } from '../../types/canvas.types'; import { useState } from 'react'; interface LayoutSelectorProps { onSelectLayout: (layoutId: LayoutType) => void; } export default function LayoutSelector({ onSelectLayout }: LayoutSelectorProps) { const layouts = getAllLayouts(); const [loadingImages, setLoadingImages] = useState>(new Set(layouts.map(l => l.id))); const handleImageLoad = (layoutId: string) => { setLoadingImages(prev => { const newSet = new Set(prev); newSet.delete(layoutId); return newSet; }); }; return (
{ e.preventDefault(); e.stopPropagation(); }} onDrag={(e) => { e.preventDefault(); e.stopPropagation(); }} onDragOver={(e) => { e.preventDefault(); e.stopPropagation(); }} > {/* 2x3 Grid - 2 layouts per row, 3 rows total */}
{/* First Row - 2 layouts */}
{layouts.slice(0, 2).map((layout) => ( ))}
{/* Second Row - 2 layouts */}
{layouts.slice(2, 4).map((layout) => ( ))}
{/* Third Row - 1 layout (Academia Hub) */}
{layouts.slice(4, 6).map((layout) => ( ))}
); }