<?php

use App\Domains\Catalog\Controllers\BrandController;
use App\Domains\Catalog\Controllers\CategoryController;
use App\Domains\Catalog\Controllers\ProductController;
use App\Domains\Catalog\Controllers\AttributeController;
use App\Domains\Catalog\Controllers\ProductVariantController;
use Illuminate\Support\Facades\Route;

Route::prefix('tenants/{tenant:codigo}')->group(function (): void {
    Route::apiResource('marcas', BrandController::class)->parameters(['marcas' => 'marca']);
    Route::apiResource('categorias', CategoryController::class)->parameters(['categorias' => 'categoria']);
    Route::apiResource('productos', ProductController::class);
    Route::apiResource('attributes', AttributeController::class);
    Route::apiResource('productos.variants', ProductVariantController::class)
        ->parameters([
            'productos' => 'producto',
            'variants' => 'productVariant',
        ]);
});
