<?php

namespace FleekDash\Controllers;

use WP_REST_Request;
use WP_REST_Response;
use FleekDash\API\UpdateManagementAPI;

/**
 * Updates Controller
 *
 * V2.2 Controller that delegates to existing UpdateManagementAPI logic
 *
 * @package FleekDash\Controllers
 * @since 2.2.0 - Phase 2 Migration
 */
class UpdatesController
{
    private $api;

    public function __construct()
    {
        $this->api = new UpdateManagementAPI();
    }

    public function checkUpdates(WP_REST_Request $request)
    {
        return $this->api->checkUpdates($request);
    }

    public function forceCheckUpdates(WP_REST_Request $request)
    {
        return $this->api->forceCheckUpdates($request);
    }

    public function startUpdate(WP_REST_Request $request)
    {
        return $this->api->startUpdate($request);
    }

    public function getUpdateStatus(WP_REST_Request $request)
    {
        return $this->api->getUpdateStatus($request);
    }

    public function cancelUpdate(WP_REST_Request $request)
    {
        return $this->api->cancelUpdate($request);
    }

    public function bulkUpdate(WP_REST_Request $request)
    {
        return $this->api->bulkUpdate($request);
    }
}

