<?php

namespace App\Console\Commands;

use App\Services\Attendance\AttendanceDailySummaryService;
use Illuminate\Console\Command;

class SendLatesSummaryCommand extends Command
{
    protected $signature = 'attendance:lates-summary';
    protected $description = 'Sends daily attendance summaries for lates to parents.';

    public function handle(AttendanceDailySummaryService $service): int
    {
        $sent = $service->sendLatesSummary();
        $this->info("Attendance lates summary completed. Sent: {$sent}.");

        return self::SUCCESS;
    }
}
