import { OFFICES_DATA } from '@/data/data'; import type { OfficeItem } from '@/types/types'; import { useRouter } from 'expo-router'; import { Activity, ChevronLeft, Lightbulb, Thermometer, Wifi, WifiOff, Zap, Plus } from 'lucide-react-native'; import React, { useState } from 'react'; import { ScrollView, Text, TouchableOpacity, View } from 'react-native'; export default function AutomationScreen() { const router = useRouter(); const [selectedOffice, setSelectedOffice] = useState(null); // --- LIST VIEW (INGRANDITA) --- return ( Domotica Controlla gli ambienti ONLINE {OFFICES_DATA.map((office) => ( router.push(`/automation/${office.id}`)} className="bg-white rounded-3xl p-6 shadow-sm flex-row items-center justify-between border border-gray-100 active:border-[#099499]/30 active:scale-[0.98]" > {office.status === 'online' ? : } {office.name} {office.temp}°C {office.power}W {/* Status Dot */} ))} {/* Spacer finale per la navbar */} {/* FAB */} alert('Aggiungi nuovo collegamento')} className="absolute bottom-8 right-6 w-16 h-16 bg-[#099499] rounded-full shadow-lg items-center justify-center active:scale-90" > ); }