<?php

declare(strict_types=1);

use Illuminate\Support\Facades\Route;
use ImovelZapAi\Importing\Presentation\Http\Controllers\Api\ImportController;

Route::middleware([
    'auth:sanctum',
    'tenant.resolve',
    'tenant.required',
    'tenant.active',
    'role:Admin|Gestor',
])->group(function (): void {
    Route::get('imports', [ImportController::class, 'index']);
    Route::post('imports', [ImportController::class, 'store']);
    Route::get('imports/{id}', [ImportController::class, 'show']);
    Route::patch('imports/{id}/mapping', [ImportController::class, 'updateMapping']);
    Route::post('imports/{id}/confirm', [ImportController::class, 'confirm']);
    Route::post('imports/{id}/retry', [ImportController::class, 'retry']);
    Route::get('imports/{id}/report', [ImportController::class, 'report']);
});
