require('dotenv').config();
const customerDb = require('./services/customerDb');

async function testAnalytics() {
    console.log("--- Testing Admin Analytics ---");

    // Test 1: Summary of Status
    console.log("\n1. Testing 'Status Apa Saja' (getSummary)...");
    const summary = await customerDb.getSummary();
    console.log("Result:", summary);

    // Test 2: Search Count "Menunggu"
    console.log("\n2. Testing 'Berapa user Menunggu' (getSearchCount)...");
    const countWait = await customerDb.getSearchCount('Menunggu');
    console.log(`Count: ${countWait}`);

    // Test 3: Search Count by Address "Denpasar" (dummy)
    console.log("\n3. Testing 'Jumlah di Bali' (Address Search)...");
    const countBali = await customerDb.getSearchCount('Bali');
    console.log(`Count: ${countBali}`);

    process.exit();
}

testAnalytics();
