<?php

namespace Modules\Booking\Events;

use Illuminate\Foundation\Events\Dispatchable;
use Modules\Booking\Models\Booking;

/**
 * Fired whenever AssignDriverAction sets or updates a booking's
 * driver/vehicle details — covers both the first assignment and any later
 * reassignment, since both go through the same action. $isFirstAssignment
 * lets listeners (e.g. the SMS notification) word the message differently
 * for "driver assigned" vs "driver info updated".
 */
class DriverAssigned
{
    use Dispatchable;

    public function __construct(public Booking $booking, public bool $isFirstAssignment) {}
}
