<?php

use Illuminate\Support\Facades\Route;
use Modules\Invite\Http\Controllers\InviteController;

Route::get('company/invite/{hash}', [InviteController::class, 'open'])->name('company.invite.open');
Route::post('company/invite/{hash}', [InviteController::class, 'process'])->name('company.invite.process');
Route::get('company/invite/{hash}/success', [InviteController::class, 'success'])->name('company.invite.success');

Route::middleware(['auth'])->group(function ()
{
    Route::get('company/{company}/invites', [InviteController::class, 'index'])->name('company.invites');
    Route::get('company/invites', [InviteController::class, 'index'])->name('company.invites.select');
    Route::post('company/{company}/create', [InviteController::class, 'create'])->name('company.invites.create');
    Route::get('company/invite/{invite}/agents', [InviteController::class, 'agents'])->name('company.invite.agents');
    Route::post('company/invite/{invite}/delete', [InviteController::class, 'delete'])->name('company.invite.delete');
});