<?php

namespace App\User\Framework\Controller\Api;

use App\User\Dto\UserPreferences;
use App\User\Dto\UserPreferencesFactory;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

#[Route('/api/user/filters')]
class UserFilterApiController extends AbstractController
{
    #[Route('', 'api.user.filters', methods: ['GET'])]
    public function getFilters(): Response
    {
        return $this->json([
            UserPreferencesFactory::createFromUser($this->getUser())
        ]);
    }
}
