// ============================================================
// MOORE AI v13 — SHARED COMPONENTS
// No import/export — globals loaded in order via index.html
// Requires: utils.js loaded first, React global
// ============================================================
const { useRef, useEffect } = React;
// =========================================================
// ICON COMPONENT (uses lucide globals)
// =========================================================
const Icon = ({ name, size = 16, className = '' }) => {
const containerRef = useRef(null);
useEffect(() => {
if (containerRef.current && window.lucide) {
containerRef.current.innerHTML = ``;
window.lucide.createIcons({ root: containerRef.current });
}
}, [name, size, className]);
return ;
};
// =========================================================
// STATUS BADGE
// =========================================================
const StatusBadge = ({ status }) => {
const cls = status === 'won' ? 'status-won' : status === 'lost' ? 'status-lost' : 'status-open';
return {status};
};
// =========================================================
// AVATAR
// =========================================================
const Avatar = ({ name, size = 36, photo }) => {
const bg = avatarBg(name);
if (photo) return ;
return (