import { a as require_react, o as __toESM, t as require_jsx_runtime } from "../index.js";
//#region app/page.tsx
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
var import_jsx_runtime = require_jsx_runtime();
var PUMPS = [
	{
		id: 1,
		short: "R1",
		name: "Riego en tierra",
		detail: "Sensor de humedad · Relé 7",
		tone: "#75db91"
	},
	{
		id: 2,
		short: "R2",
		name: "Riego 110 V #1",
		detail: "Bomba secundaria · Relé 8",
		tone: "#56c8ff"
	},
	{
		id: 3,
		short: "R3",
		name: "Riego 110 V #2",
		detail: "Bomba secundaria · Relé 9",
		tone: "#b49cff"
	}
];
var AUTHORS = [
	"Santiago Andrés Sánchez Castro",
	"Sharon Valeria Salamandra Buitrago",
	"Fayshell Yaritza Marín Astaiza",
	"Sofia Arcila Sanchez",
	"Isabella Carvajal Páez"
];
var stamp = () => (/* @__PURE__ */ new Date()).toLocaleTimeString("es-CO", {
	hour: "2-digit",
	minute: "2-digit",
	second: "2-digit"
});
function Home() {
	const [connected, setConnected] = (0, import_react.useState)(false);
	const [demo, setDemo] = (0, import_react.useState)(true);
	const [humidity, setHumidity] = (0, import_react.useState)(438);
	const [dry, setDry] = (0, import_react.useState)(false);
	const [pump, setPump] = (0, import_react.useState)(0);
	const [remaining, setRemaining] = (0, import_react.useState)(0);
	const [cycle, setCycle] = (0, import_react.useState)(false);
	const [origin, setOrigin] = (0, import_react.useState)("En espera");
	const [lastUpdate, setLastUpdate] = (0, import_react.useState)(stamp());
	const [history, setHistory] = (0, import_react.useState)([
		420,
		428,
		432,
		441,
		445,
		439,
		438
	]);
	const [logs, setLogs] = (0, import_react.useState)([{
		time: stamp(),
		text: "Panel de monitoreo preparado",
		kind: "ok"
	}, {
		time: stamp(),
		text: "Modo demostración activo",
		kind: "info"
	}]);
	const [serialError, setSerialError] = (0, import_react.useState)("");
	const [fullscreen, setFullscreen] = (0, import_react.useState)(false);
	const portRef = (0, import_react.useRef)(null);
	const readerRef = (0, import_react.useRef)(null);
	const addLog = (text, kind = "info") => {
		setLogs((items) => [{
			time: stamp(),
			text,
			kind
		}, ...items].slice(0, 6));
	};
	const processLine = (line) => {
		const clean = line.trim();
		if (!clean) return;
		setLastUpdate(stamp());
		try {
			const data = JSON.parse(clean);
			if (typeof data.humedad === "number") {
				setHumidity(data.humedad);
				setDry(Boolean(data.seca));
				setHistory((values) => [...values.slice(-19), data.humedad]);
			}
			if (typeof data.bomba === "number") setPump(data.bomba);
			if (typeof data.restante === "number") setRemaining(data.restante);
			if (typeof data.secuencia === "boolean") setCycle(data.secuencia);
			if (data.origen) setOrigin(data.origen === "SENSOR" ? "Tierra seca" : data.origen === "PULSADOR" ? "Pulsador físico" : data.origen === "DASHBOARD" ? "Botón del panel" : data.origen);
			if (data.evento) addLog(data.evento, data.evento.includes("completada") ? "ok" : "info");
			return;
		} catch {}
		const humidityMatch = clean.match(/Humedad:\s*(\d+)/i);
		if (humidityMatch) {
			const value = Number(humidityMatch[1]);
			setHumidity(value);
			setDry(value > 550);
			setHistory((values) => [...values.slice(-19), value]);
		}
		const relayMatch = clean.match(/Rel.{0,2}\s*(\d)\s*activo/i);
		if (relayMatch) {
			setPump(Number(relayMatch[1]));
			setCycle(true);
			setRemaining(30);
			addLog(`Riego ${relayMatch[1]} activado`, "info");
		}
	};
	const connectSerial = async () => {
		setSerialError("");
		try {
			if ((await fetch("/api/serial/connect", { method: "POST" })).ok) {
				addLog("Buscando Arduino en COM7…", "info");
				return;
			}
		} catch {}
		const nav = navigator;
		if (!nav.serial) {
			setSerialError("Abre el panel en Chrome o Edge para usar la conexión USB.");
			return;
		}
		try {
			const port = await nav.serial.requestPort();
			await port.open({ baudRate: 9600 });
			portRef.current = port;
			setConnected(true);
			setDemo(false);
			addLog("Arduino conectado por USB", "ok");
			if (!port.readable) return;
			const decoder = new TextDecoderStream();
			port.readable.pipeTo(decoder.writable).catch(() => void 0);
			const reader = decoder.readable.getReader();
			readerRef.current = reader;
			let buffer = "";
			while (true) {
				const { value, done } = await reader.read();
				if (done) break;
				buffer += value;
				const lines = buffer.split(/\r?\n/);
				buffer = lines.pop() ?? "";
				lines.forEach(processLine);
			}
		} catch (error) {
			if (error.name !== "NotFoundError") setSerialError("No fue posible abrir el puerto. Cierra el Monitor Serial de Arduino e inténtalo de nuevo.");
		}
	};
	const disconnect = async () => {
		try {
			if (portRef.current) {
				await readerRef.current?.cancel();
				readerRef.current?.releaseLock();
				await portRef.current.close();
			} else await fetch("/api/serial/disconnect", { method: "POST" });
		} catch {}
		readerRef.current = null;
		portRef.current = null;
		setConnected(false);
		setPump(0);
		setCycle(false);
		addLog("Arduino desconectado", "warn");
	};
	const startManualIrrigation = async () => {
		if (!connected) {
			setSerialError("Conecta primero el Arduino para iniciar el riego manual.");
			return;
		}
		if (cycle) {
			setSerialError("Ya existe una secuencia de riego en ejecución.");
			return;
		}
		try {
			if (portRef.current?.writable) {
				const writer = portRef.current.writable.getWriter();
				await writer.write(new TextEncoder().encode("START\n"));
				writer.releaseLock();
			} else if (!(await fetch("/api/serial/start", { method: "POST" })).ok) throw new Error("Arduino no conectado");
			addLog("Orden manual enviada al Arduino", "warn");
			setOrigin("Orden desde el panel");
		} catch {
			setSerialError("No fue posible enviar la orden manual al Arduino.");
		}
	};
	const toggleFullscreen = async () => {
		try {
			if (!document.fullscreenElement) await document.documentElement.requestFullscreen();
			else await document.exitFullscreen();
		} catch {
			setSerialError("El navegador no permitió activar la pantalla completa.");
		}
	};
	(0, import_react.useEffect)(() => {
		const onFullscreen = () => setFullscreen(Boolean(document.fullscreenElement));
		document.addEventListener("fullscreenchange", onFullscreen);
		const events = new EventSource("/api/serial/events");
		events.addEventListener("status", (event) => {
			const data = JSON.parse(event.data);
			if (data.status === "connected") {
				setConnected(true);
				setDemo(false);
				setSerialError("");
				addLog(`${data.port} conectado automáticamente`, "ok");
			} else if (data.status === "error") {
				setConnected(false);
				setSerialError(`No se pudo abrir ${data.port}: ${data.message}`);
			} else if (data.status === "disconnected") setConnected(false);
		});
		events.addEventListener("telemetry", (event) => {
			processLine(JSON.parse(event.data).line);
		});
		return () => {
			document.removeEventListener("fullscreenchange", onFullscreen);
			events.close();
		};
	}, []);
	(0, import_react.useEffect)(() => {
		if (!demo || connected) return;
		let phase = 0;
		const timer = window.setInterval(() => {
			phase += 1;
			const activePump = phase < 6 ? 0 : phase < 12 ? 1 : phase < 14 ? 0 : phase < 20 ? 2 : phase < 22 ? 0 : phase < 28 ? 3 : 0;
			const seconds = activePump ? 30 - phase % 7 * 5 : 0;
			const value = phase < 6 ? 565 + phase * 3 : Math.max(405, 585 - phase * 6);
			setHumidity(value);
			setDry(value > 550);
			setPump(activePump);
			setCycle(activePump > 0);
			setRemaining(Math.max(0, seconds));
			setOrigin(activePump ? "Tierra seca" : "En espera");
			setLastUpdate(stamp());
			setHistory((v) => [...v.slice(-19), value]);
			if (phase === 6) addLog("Riego 1 iniciado por tierra seca", "warn");
			if (phase === 14) addLog("Riego 2 activado", "info");
			if (phase === 22) addLog("Riego 3 activado", "info");
			if (phase >= 30) {
				phase = 0;
				addLog("Secuencia de riego completada", "ok");
			}
		}, 1e3);
		return () => window.clearInterval(timer);
	}, [demo, connected]);
	const moisturePercent = Math.max(0, Math.min(100, Math.round((1023 - humidity) / 10.23)));
	const chart = (0, import_react.useMemo)(() => {
		const width = 520, height = 120;
		const min = 350, max = 650;
		return history.map((value, i) => `${i / Math.max(1, history.length - 1) * width},${height - (value - min) / (max - min) * height}`).join(" ");
	}, [history]);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("main", {
		className: "app-shell",
		children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", {
				className: "topbar",
				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
					className: "brand",
					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
						className: "school-logo",
						src: "/fundanza-logo.png",
						alt: "Logo de Fundanza"
					}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "Aqua Café 10B" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: "FUNDANZA · SISTEMA DE RIEGO" })] })]
				}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
					className: "top-actions",
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
							className: `connection ${connected ? "online" : demo ? "demo" : ""}`,
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", {}), connected ? "Arduino conectado" : demo ? "Demostración" : "Sin conexión"]
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
							className: "button fullscreen",
							onClick: toggleFullscreen,
							title: "Mostrar el dashboard en toda la pantalla",
							children: [
								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: fullscreen ? "⊙" : "⛶" }),
								" ",
								fullscreen ? "Salir" : "Pantalla completa"
							]
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
							className: "button manual",
							onClick: startManualIrrigation,
							disabled: !connected || cycle,
							title: !connected ? "Conecta primero el Arduino" : cycle ? "Secuencia en curso" : "Iniciar los tres riegos",
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
								className: "manual-icon",
								children: "▶"
							}), " Iniciar riego manual"]
						}),
						connected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
							className: "button ghost",
							onClick: disconnect,
							children: "Desconectar"
						}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
							className: "button primary",
							onClick: connectSerial,
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
								className: "usb",
								children: "⌁"
							}), " Conectar Arduino"]
						})
					]
				})]
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
				className: "hero",
				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
					className: "hero-copy",
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
							className: "eyebrow",
							children: "AQUA CAFÉ 10B · CENTRO DE CONTROL"
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h1", { children: [
							"El agua, justo cuando",
							/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
							/* @__PURE__ */ (0, import_jsx_runtime.jsx)("em", { children: "la tierra la necesita." })
						] }),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
							className: "intro",
							children: "Supervisión local y en tiempo real de los tres sistemas de riego."
						})
					]
				}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
					className: `system-state ${cycle ? "running" : ""}`,
					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
						className: "state-icon",
						children: cycle ? "◉" : "✓"
					}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: "ESTADO GENERAL" }),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: cycle ? `Regando zona ${pump}` : "Sistema en espera" }),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: cycle ? `${remaining} s restantes` : "Todos los equipos están listos" })
					] })]
				})]
			}),
			serialError && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
				className: "notice",
				children: [
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "!" }),
					serialError,
					/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
						onClick: () => setSerialError(""),
						children: "×"
					})
				]
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
				className: "dashboard-grid",
				children: [
					/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
						className: `moisture-card card ${dry ? "is-dry" : ""}`,
						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
							className: "card-heading",
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
								className: "eyebrow",
								children: "SENSOR PRINCIPAL · A0"
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Humedad del suelo" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
								className: `status-pill ${dry ? "warning" : "good"}`,
								children: dry ? "Tierra seca" : "Tierra húmeda"
							})]
						}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
							className: "moisture-body",
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
								className: "gauge",
								style: { "--level": `${moisturePercent}%` },
								children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gauge-water" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
									className: "gauge-content",
									children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: humidity }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "lectura analógica" })]
								})]
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
								className: "moisture-info",
								children: [
									/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
										className: "big-percent",
										children: [moisturePercent, /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "%" })]
									}),
									/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Humedad estimada" }),
									/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
										className: "threshold",
										children: [
											/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "0 · Húmedo" }),
											/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Umbral: 550" }),
											/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "1023 · Seco" }),
											/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { style: { left: `${Math.min(100, humidity / 10.23)}%` } })
										]
									}),
									/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: dry ? "La lectura supera el límite. El sistema puede iniciar la secuencia automáticamente." : `Margen seguro de ${550 - humidity} puntos antes del límite de sequedad.` })
								]
							})]
						})]
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
						className: "card cycle-card",
						children: [
							/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
								className: "card-heading",
								children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
									className: "eyebrow",
									children: "SECUENCIA AUTOMÁTICA"
								}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Ruta del agua" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
									className: "sequence-origin",
									children: origin
								})]
							}),
							/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
								className: "pump-route",
								children: PUMPS.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
									className: "route-item",
									children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
										className: `pump-node ${pump === item.id ? "active" : pump > item.id ? "done" : ""}`,
										style: { "--tone": item.tone },
										"aria-label": `Motor ${item.id} ${pump === item.id ? "encendido" : "apagado"}`,
										children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
											className: "motor-sim",
											children: [
												/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "motor-cap" }),
												/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
													className: "motor-body",
													children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", {
														className: "rotor",
														children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", {})
													}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "motor-lines" })]
												}),
												/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "motor-base" }),
												/* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: item.short })
											]
										}), pump === item.id && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "pulse-ring" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "energy-wave" })] })]
									}), index < 2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
										className: `pipe ${pump > item.id ? "filled" : pump === item.id ? "flowing" : ""}`,
										children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", {})
									})]
								}, item.id))
							}),
							/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
								className: "pump-labels",
								children: PUMPS.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: item.name }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: item.detail })] }, item.id))
							}),
							/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
								className: "cycle-footer",
								children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
									className: "timer",
									children: [
										String(Math.floor(remaining / 60)).padStart(2, "0"),
										":",
										String(remaining % 60).padStart(2, "0")
									]
								}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: cycle ? "Tiempo restante de la etapa" : "Esperando nueva secuencia" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
									className: "step-dots",
									children: PUMPS.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { className: pump === p.id ? "active" : pump > p.id ? "done" : "" }, p.id))
								})]
							})
						]
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
						className: "card chart-card",
						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
							className: "card-heading",
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
								className: "eyebrow",
								children: "ÚLTIMAS LECTURAS"
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Tendencia de humedad" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
								className: "updated",
								children: ["Actualizado ", lastUpdate]
							})]
						}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
							className: "chart-wrap",
							children: [
								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
									className: "limit-label",
									children: "Límite seco · 550"
								}),
								/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "limit-line" }),
								/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
									viewBox: "0 0 520 120",
									preserveAspectRatio: "none",
									"aria-label": "Gráfica de humedad",
									children: [
										/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", {
											id: "area",
											x1: "0",
											y1: "0",
											x2: "0",
											y2: "1",
											children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
												offset: "0",
												stopColor: "#67d898",
												stopOpacity: ".35"
											}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
												offset: "1",
												stopColor: "#67d898",
												stopOpacity: "0"
											})]
										}) }),
										/* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", {
											points: `0,120 ${chart} 520,120`,
											fill: "url(#area)"
										}),
										/* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", {
											points: chart,
											fill: "none",
											stroke: "#67d898",
											strokeWidth: "4",
											strokeLinecap: "round",
											strokeLinejoin: "round"
										})
									]
								})
							]
						})]
					}),
					/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
						className: "card activity-card",
						children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
							className: "card-heading",
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
								className: "eyebrow",
								children: "REGISTRO EN VIVO"
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Actividad reciente" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
								className: `demo-toggle ${demo ? "on" : ""}`,
								disabled: connected,
								onClick: () => setDemo((v) => !v),
								children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", {}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Demo" })]
							})]
						}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
							className: "activity-list",
							children: logs.map((log, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
								className: "log-row",
								children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `log-dot ${log.kind}` }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: log.text }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: log.time })] })]
							}, `${log.time}-${i}`))
						})]
					})
				]
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "⚡ Monitoreo local · Los datos permanecen en este computador" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["Proyecto ", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "Aqua Café 10B · Fundanza" })] })] }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
				className: "authors-ribbon",
				"aria-label": "Autores del proyecto",
				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "AUTORES" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
					className: "authors-track",
					children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: AUTHORS.join("  ·  ") }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
						"aria-hidden": "true",
						children: AUTHORS.join("  ·  ")
					})]
				})]
			})
		]
	});
}
//#endregion
export { Home as default };
