<?php

namespace App\Http\Controllers\Ranch;

use App\Http\Controllers\Controller;
use App\Services\RanchAlertCenterService;
use Illuminate\Http\JsonResponse;

class RanchAlertCenterController extends Controller
{
    public function __construct(
        private readonly RanchAlertCenterService $alertCenterService,
    ) {}

    public function index(): JsonResponse
    {
        return response()->json([
            'data' => $this->alertCenterService->generate(),
        ]);
    }
}
