<?php 

namespace PpPhp\Core\Designer;

class DesignerLayoutController
{
    public function createLayout(Request $request): JsonResponse
    {
        $layout = (string)$request->input('layout');

        return new JsonResponse([
            'success' => true,
            'components' => LayoutFactory::make($layout)
        ]);
    }
}