<?php

declare(strict_types=1);

namespace SbpJm\FlarumMSTeamsWebhook\Job;

use Flarum\Notification\Blueprint\BlueprintInterface;
use Flarum\User\User;
use SbpJm\FlarumMSTeamsWebhook\Service\TeamsActivityNotifier;

class SendTeamsActivityNotificationJob
{
    public int $tries = 3;

    public function __construct(
        public BlueprintInterface $blueprint,
        public User $user
    ) {
    }

    public function handle(TeamsActivityNotifier $notifier): void
    {
        $notifier->notify($this->user, $this->blueprint);
    }
}
