<?php

declare(strict_types=1);

namespace WorkforceOS\Services;

final class DeviceService
{
    public function list(array $tenant): array
    {
        return [
            'tenant_id' => $tenant['id'],
            'supported_models' => ['F22', 'K40', 'MB Series', 'UFace', 'iClock'],
            'devices' => [
                [
                    'serial' => 'F22-HQ-01',
                    'model' => 'F22',
                    'branch' => 'Head Office',
                    'status' => 'online',
                    'last_sync_at' => date('c', strtotime('-2 minutes')),
                    'modes' => ['fingerprint', 'rfid', 'pin'],
                ],
                [
                    'serial' => 'UFACE-GZ-02',
                    'model' => 'UFace',
                    'branch' => 'Gazipur Plant',
                    'status' => 'online',
                    'last_sync_at' => date('c', strtotime('-5 minutes')),
                    'modes' => ['face', 'fingerprint', 'rfid', 'pin'],
                ],
            ],
            'commands' => ['sync_users', 'pull_logs', 'push_employee', 'restart_device'],
        ];
    }
}
