'use client'; import { useState } from 'react'; import { useColorStore } from '@/store/color-store'; import { useToolStore } from '@/store'; import { ColorPicker } from './color-picker'; import { ColorSwatches } from './color-swatches'; import { ArrowLeftRight, Palette, Clock, Grid3x3 } from 'lucide-react'; import { cn } from '@/lib/utils'; type Tab = 'picker' | 'swatches' | 'recent'; export function ColorPanel() { const { primaryColor, secondaryColor, recentColors, customSwatches, setPrimaryColor, setSecondaryColor, swapColors, addCustomSwatch, removeCustomSwatch, } = useColorStore(); const { setColor } = useToolStore(); const [activeTab, setActiveTab] = useState('picker'); const handleColorChange = (color: string) => { setPrimaryColor(color); setColor(color); }; return (
{/* Current colors display */}
{/* Primary/Secondary color squares */}
{/* Swap button */} {/* Color values */}
{primaryColor}
{secondaryColor}
{/* Tabs */}
{/* Content */}
{activeTab === 'picker' && ( )} {activeTab === 'swatches' && ( )} {activeTab === 'recent' && (

Recently used colors

{recentColors.length > 0 ? (
{recentColors.map((color, index) => (
) : (

No recent colors yet. Start drawing!

)}
)}
); }