<?php

declare(strict_types=1);

use Flarum\Extend;
use SbpJm\FlarumMSTeamsWebhook\Console\TestTeamsUserCommand;
use SbpJm\FlarumMSTeamsWebhook\Listener\MirrorAlertsToTeams;

return [
    (new Extend\Locales(__DIR__ . '/locale')),

    // Admin UI (Settings etc.)
    (new Extend\Frontend('admin'))
        ->js(__DIR__ . '/js/dist/admin.js'),

    // Forum UI (User notification settings – Teams checkbox)
    (new Extend\Frontend('forum'))
        ->js(__DIR__ . '/js/dist/forum.js'),

    // CLI test command
    (new Extend\Console())
        ->command(TestTeamsUserCommand::class),

    // ✅ EINZIGER Notification-Hook (richtig für Flarum 1.8.x)
    (new Extend\Notification())
        ->beforeSending(MirrorAlertsToTeams::class),
];