<?php

use App\Http\Controllers\ComplianceController;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\ImportController;
use App\Http\Controllers\MappingController;
use App\Http\Controllers\MapController;
use Illuminate\Support\Facades\Route;

Route::get('/', DashboardController::class)->name('dashboard');
Route::get('imports', [ImportController::class, 'index'])->name('imports.index');
Route::post('imports/upload', [ImportController::class, 'upload'])->name('imports.upload');
Route::post('imports/location', [ImportController::class, 'uploadLocation'])->name('imports.location');
Route::get('imports/{import}', [ImportController::class, 'show'])->name('imports.show');
Route::get('imports/{import}/mapping', [MappingController::class, 'mapping'])->name('imports.mapping');
Route::post('imports/{import}/match', [MappingController::class, 'runMatch'])->name('imports.match');
Route::post('mapping/approve', [MappingController::class, 'approve'])->name('mapping.approve');
Route::post('mapping/exception', [MappingController::class, 'markException'])->name('mapping.exception');

Route::get('compliance', [ComplianceController::class, 'index'])->name('compliance.index');
Route::get('compliance/{mr}', [ComplianceController::class, 'show'])->name('compliance.show');

Route::get('map', [MapController::class, 'index'])->name('map.index');
Route::get('map/route/{mr}', [MapController::class, 'routeData'])->name('map.route');
Route::post('map', [MapController::class, 'store'])->name('map.store');
Route::get('map/saved/{savedMap}', [MapController::class, 'show'])->name('map.saved.show');
