package com.walkguide.service;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Service;

@Service
public class MockDataService {

    // Tambahin 'final' di sini sesuai saran VS Code
    private final Map<String, Object> userStatus = new HashMap<>();
    private final Map<String, Object> hardwareShortcuts = new HashMap<>();
    private final Map<String, Object> aiSettings = new HashMap<>();

    public MockDataService() {
        // Data default awal saat Spring Boot nyala
        userStatus.put("status", "Sedang Berjalan");
        userStatus.put("location", "Jl. Kenangan, SBY");
        userStatus.put("batteryLevel", 85);
        userStatus.put("lastSeen", "2026-04-23T08:40:00Z");

        hardwareShortcuts.put("volumeUpAction", "accept_call");
        hardwareShortcuts.put("volumeDownAction", "emergency_ping");

        aiSettings.put("alertDistanceMeters", 2.5);
        aiSettings.put("hapticFeedback", true);
    }

    public Map<String, Object> getUserStatus() {
        return userStatus;
    }

    public Map<String, Object> updateShortcuts(Map<String, Object> newShortcuts) {
        hardwareShortcuts.putAll(newShortcuts);
        return hardwareShortcuts;
    }

    public Map<String, Object> updateAiSettings(Map<String, Object> newSettings) {
        aiSettings.putAll(newSettings);
        return aiSettings;
    }
}