import { useState, useEffect } from 'react'; /** * Mana Symbol Settings Component * Allows users to toggle between custom circular symbols and Scryfall SVG symbols */ function readUseSVGFromStorage() { if (typeof window === 'undefined') return false; const savedSetting = localStorage.getItem('mana-symbol-svg'); return savedSetting === 'true'; } export default function ManaSymbolSettings({ onSettingsChange }) { const [useSVG, setUseSVG] = useState(readUseSVGFromStorage); useEffect(() => { if (typeof window === 'undefined') return; const savedSetting = localStorage.getItem('mana-symbol-svg'); if (savedSetting !== null && onSettingsChange) { onSettingsChange({ useSVG: savedSetting === 'true' }); } }, [onSettingsChange]); const handleToggle = () => { const newUseSVG = !useSVG; setUseSVG(newUseSVG); localStorage.setItem('mana-symbol-svg', newUseSVG.toString()); if (onSettingsChange) { onSettingsChange({ useSVG: newUseSVG }); } }; return (

Mana Symbol Style

{useSVG ? 'Using official Scryfall SVG symbols' : 'Using custom circular symbols'}

); }