<?php

defined( 'ABSPATH' ) || exit;

use EmailCraft\App\Http\Controllers\Admin\TestEmailController;
use EmailCraft\App\Http\Controllers\Admin\TemplateController;
use EmailCraft\WpMVC\Routing\Route;

Route::group(
    'admin', function() {
        Route::group(
            'templates', function() {
                Route::post( '{id}/status', [TemplateController::class, 'updateStatus'] );
                Route::resource( '/', TemplateController::class );
            }
        );
        Route::post( 'test-email', [TestEmailController::class, 'send_email'] );
    }, ['admin']
);
