import { FC } from "react"; import { View, ViewStyle } from "react-native"; import { IconBackground } from "./IconBackground"; interface EnvLaptopIconProps { size?: number; color?: string; glowColor?: string; colorPreset?: "green" | "cyan" | "purple" | "pink" | "yellow" | "orange"; variant?: "circuit" | "matrix" | "glitch" | "nodes" | "grid"; noBackground?: boolean; } const ColorPresets = { green: { color: "#00FF88", glow: "#00FF88" }, cyan: { color: "#00D4FF", glow: "#00D4FF" }, purple: { color: "#9945FF", glow: "#9945FF" }, pink: { color: "#FF45FF", glow: "#FF45FF" }, yellow: { color: "#FFD700", glow: "#FFD700" }, orange: { color: "#FF8800", glow: "#FF8800" }, }; // Keyboard layout - two rows of keys for realistic appearance const KEYBOARD_ROW_1 = [1, 3, 5, 7, 9, 11, 13, 15, 17]; // Top row keys const KEYBOARD_ROW_2 = [2, 4, 6, 8, 10, 12, 14, 16]; // Bottom row keys const SPACEBAR = { x: 5, width: 10, y: 5.5 }; // Spacebar // Simplified screen dots const SCREEN_DOTS = [ { x: 0.3, y: 0.3 }, { x: 0.7, y: 0.3 }, { x: 0.5, y: 0.7 }, ]; export const EnvLaptopIcon: FC = ({ size = 24, color, glowColor, colorPreset = "green", variant = "circuit", noBackground = true, }) => { const scale = noBackground ? size / 24 : size / 40; const preset = ColorPresets[colorPreset as keyof typeof ColorPresets] || ColorPresets.green; const activeColor = color || preset.color; const activeGlow = glowColor || preset.glow; const iconContent = ( <> {/* Laptop base/keyboard */} {/* Top row of keys */} {KEYBOARD_ROW_1.map((x, i) => ( ))} {/* Bottom row of keys */} {KEYBOARD_ROW_2.map((x, i) => ( ))} {/* Spacebar */} {/* Single base glow */} {/* Laptop screen */} {/* Screen inner */} {/* Simplified code lines */} {[2, 4, 6].map((y, i) => ( ))} {/* Power indicator */} {/* Simplified screen dots */} {SCREEN_DOTS.map((dot, i) => ( ))} ); if (noBackground) { return ( {iconContent} ); } return ( {iconContent} ); }; export const ServerIcon = EnvLaptopIcon; export const LaptopIcon = EnvLaptopIcon;