<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class GuideUpdated implements ShouldBroadcast
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public function __construct()
    {
        // Kosongkan saja karena kita hanya butuh sinyal refresh
    }

    public function broadcastOn(): array
    {
        return [
            new Channel('pendakian'),
        ];
    }

    public function broadcastAs(): string
    {
        return 'guide.updated';
    }
}