<?php
declare(strict_types=1);
namespace Controllers;

use Helpers\Response;
use Services\ProductService;
use Services\BlogService;
use Services\CategoryService;

final class SeoController
{
    public function sitemapData(): never
    {
        Response::success([
            'static' => ['/', '/products', '/blogs', '/contact', '/bulk-orders', '/distributor-inquiry'],
            'categories' => (new CategoryService())->list(),
            'products' => (new ProductService())->list(['limit' => 50]),
            'blogs' => (new BlogService())->list(['limit' => 50]),
            'generated_at' => date(DATE_ATOM)
        ]);
    }
}
