import React, { useState } from 'react'; import './CharacterPalette.css'; const SYMBOL_PALETTE = { 'Single Lines': { horizontal: '─', vertical: '│', topLeft: '┌', topRight: '┐', bottomLeft: '└', bottomRight: '┘', cross: '┼', tTop: '┴', tBottom: '┬', tLeft: '┤', tRight: '├' }, 'Double Lines': { horizontal: '═', vertical: '║', topLeft: '╔', topRight: '╗', bottomLeft: '╚', bottomRight: '╝', cross: '╬', tTop: '╩', tBottom: '╦', tLeft: '╣', tRight: '╠' }, 'Mixed Junctions': { crossSingleH: '╫', crossSingleV: '╪', doubleDownSingleH: '╤', doubleUpSingleH: '╧', doubleRightSingleV: '╟', doubleLeftSingleV: '╢' }, 'Rounded Corners': { topLeft: '╭', topRight: '╮', bottomLeft: '╰', bottomRight: '╯' }, 'Heavy Lines': { horizontal: '━', vertical: '┃', topLeft: '┏', topRight: '┓', bottomLeft: '┗', bottomRight: '┛' }, 'Common Symbols': { space: ' ', bullet: '•', dash: '–', equals: '=', underscore: '_', hash: '#' } }; function CharacterPalette({ selectedChar, onSelectChar, onClose }) { const [expandedCategory, setExpandedCategory] = useState('Single Lines'); const toggleCategory = (category) => { setExpandedCategory(prev => prev === category ? null : category); }; return (