<?php

namespace App\Modules\Push;


use App\Modules\Bookings\Support;
use App\Modules\Bookings\Onsite;
use App\Modules\Bookings\SaleLead;
use App\Modules\Bookings\Order;
use App\Modules\Bookings\Task;
use App\Modules\Bookings\Comment;
use App\Modules\Bookings\Part;
use App\Modules\Clients\Client;
use App\Modules\Clients\Customer;
use App\Modules\Clients\Site;
use App\Modules\Clients\SiteUser;
use App\Models\User;
use App\Modules\Push\EventObserver;
// Removed Kashflow import - using Xero integration instead

// These must resolve to real classes or aliases
use Files;
use Severity;
use Status;

class ServiceProvider extends \App\Modules\ServiceProvider
{
    public function register()
    {
        parent::register('push-notification');
    }

    public function boot()
    {
        parent::boot('push-notification');

        $observer = new EventObserver();

        $observables = [
            Support::class,
            Onsite::class,
            SaleLead::class,
            Order::class,
            Task::class,
            Comment::class,
            Part::class,
            Client::class,
            Customer::class,
            Site::class,
            SiteUser::class,
            Files::class,
            Severity::class,
            Status::class,
            User::class,
        ];

        foreach ($observables as $model) {
            $model::observe($observer);
        }
    }
}
