<?php

use App\Domains\Catalog\Controllers\CatalogController;
use Illuminate\Support\Facades\Route;

Route::prefix('tenants/{tenant:codigo}')->group(function (): void {
    Route::get('catalog', [CatalogController::class, 'index']);
    Route::get('catalog/featured-groups/{featuredGroup}/items', [CatalogController::class, 'featuredGroupItems'])
        ->name('catalog.featured-groups.items.index');
    Route::get('catalog-items', [CatalogController::class, 'search'])
        ->name('catalog-items.index');
    Route::get('categories/{category}', [CatalogController::class, 'category'])
        ->name('categories.show');
    Route::get('catalog-items/{catalogItem}', [CatalogController::class, 'show']);
    Route::post('catalog-items/{catalogItem}/variant-options', [CatalogController::class, 'variantOptions']);
    Route::post('catalog-items', [CatalogController::class, 'store']);
});

require __DIR__.'/adminapp.php';
