<?php

declare(strict_types=1);

use Illuminate\Support\Facades\Route;
use ImovelZapAi\Signatures\Presentation\Http\Controllers\Api\SignatureController;

Route::middleware([
    'auth:sanctum',
    'tenant.resolve',
    'tenant.required',
    'tenant.active',
    'role:Admin|Gestor|Corretor',
])->group(function (): void {
    Route::get('signatures/dashboard', [SignatureController::class, 'dashboard']);
    Route::get('signatures', [SignatureController::class, 'index']);
    Route::post('signatures', [SignatureController::class, 'store']);
    Route::get('signatures/{id}', [SignatureController::class, 'show']);
    Route::post('signatures/{id}/send', [SignatureController::class, 'send']);
    Route::post('signatures/{id}/cancel', [SignatureController::class, 'cancel']);
    Route::post('signatures/{id}/remind', [SignatureController::class, 'remind']);
    Route::get('signatures/{id}/audit', [SignatureController::class, 'audit']);
});
