<?php

namespace KupShop\CatalogBundle\Controller;

use KupShop\CatalogBundle\View\AutocompleteView;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;

class AutocompleteController extends AbstractController
{
    /**
     * @Route("/autocomplete/")
     *
     * @return JsonResponse
     */
    public function autocompleteAction(AutocompleteView $autocompleteView)
    {
        return $autocompleteView->handleAutocomplete();
    }
}
