<?php

namespace FleekDash\Controllers;

use WP_REST_Request;
use WP_REST_Response;
use FleekDash\API\ThemeDirectoryAPI;

/**
 * Theme Directory Controller
 *
 * V2.2 Controller that delegates to existing ThemeDirectoryAPI logic
 *
 * @package FleekDash\Controllers
 * @since 2.2.0 - Phase 2 Migration
 */
class ThemeDirectoryController
{
    private $api;

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

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

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

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

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

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

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

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