<?php
require __DIR__ . '/../../vendor/autoload.php';

use Pusher\Pusher;

/**
 * Create and return a configured Pusher instance
 */
function pusher_instance(): Pusher
{
    // 🔐 Pusher credentials (from Pusher Dashboard → App Keys)
    $appId   = '2104422';
    $authKey = '4c55862ae8b11fa48c61';
    $secret  = '5149d28d6d60802a12d1';
    $cluster = 'mt1';

    return new Pusher(
        $authKey,
        $secret,
        $appId,
        [
            'cluster' => $cluster,
            'useTLS'  => true,
        ]
    );
}
