<?php
// pages/components/newsletter_item_modal.php
// Thin wrapper delegating to generic CRUD controller for NewsletterItem

use Components\Resources\Controllers\CrudController;
use Components\Models\NewsletterItem;

ob_start();

echo CrudController::handle([
    'modelClass'   => NewsletterItem::class,
    'selfRoute'    => 'newsletter_item_modal',
//    'oobListRoute' => 'newsletter_items_list',
    // Emit HX-Trigger events like newsletter_item:updated with { id }
    'event_prefix' => 'newsletter_item',
    'autoclose' => true,
]);

$__html = ob_get_clean();
echo $__html;
