<?php

namespace App\Http\Controllers\Api\V1\Admin\Draw;

use App\Support\ApiResponse;
use Illuminate\Http\JsonResponse;
use App\Http\Controllers\Controller;
use App\Services\Draw\DrawPlannerService;

final class DrawPlanGenerateController extends Controller
{
    public function __construct(
        private readonly DrawPlannerService $planner,
    ) {}

    public function __invoke(): JsonResponse
    {
        return ApiResponse::success($this->planner->ensureBuffer());
    }
}
