<?php

namespace Modules\Bms\Services\Contracts;

/**
 * Web-push boundary. BMS-native (minishlink/web-push) so the module does not
 * depend on the PortalApi push layer. Bound in Config/config.php.
 */
interface PushServiceContract
{
    /** True when VAPID keys are configured (push is operational). */
    public function enabled(): bool;

    /** The VAPID public key the PWAs subscribe with. */
    public function publicKey(): ?string;

    /**
     * Deliver a notification payload to the relevant subscriptions.
     *
     * @return array  ['ok' => bool, 'sent' => int, 'pruned' => int]
     */
    public function sendForNotification(int $businessId, array $payload): array;
}
