<?php

declare(strict_types=1);

namespace Ost\ReimportDataengine\Controller;

use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Attribute\Route;

#[Route(defaults: ['_routeScope' => ['api']])]
final class ProductFeedAdminController
{
    #[Route(
        path: '/api/_action/reimport-dataengine/status',
        name: 'api.action.reimport-dataengine.status',
        methods: ['GET'],
        defaults: ['_acl' => ['product.viewer']]
    )]
    public function status(): JsonResponse
    {
        return new JsonResponse([
            'downloadUrl' => '/reimport-dataengine/feed.csv',
            'format' => 'csv',
            'columns' => [
                'ordernumber',
                'category',
                'shop',
                'attr63',
                'link',
                'image_link',
                'additional_image_link_1',
                'additional_image_link_2',
                'additional_image_link_3',
                'additional_image_link_4',
            ],
        ]);
    }
}
