<?php
if (!defined("ABSPATH")) {
    die("Not Allowed");
}

$vend = $_GET['vend'] ?? '';
$service = Vtupress_Service_Container::get($vend);

if ($service && method_exists($service, 'render_frontend')) {
    echo $service->render_frontend($user, $runcode ?? "");
} else {
    // If we are here, it means we routed to a service that doesn't have render_frontend implementation yet
    // or the service ID is invalid.
    echo "<div class='alert alert-danger'>Service template not found or not supported.</div>";
}
?>
