<?php

namespace Mtc\Plugins\BlockManager\Http\Controllers;

use Illuminate\Http\JsonResponse;
use Illuminate\Routing\Controller;
use Mtc\Plugins\BlockManager\Services\PropertySchemaService;

/**
 * Read-only JSON endpoint exposing the Designer's canonical panel + property
 * list. Consumed by DesignerRoot.vue to render the right-rail panels.
 */
class PropertySchemaController extends Controller
{
    public function __construct(private PropertySchemaService $schema)
    {
    }

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