<?php

namespace App\Observers;

use App\Models\Bank;

class BankObserver
{
    /**
     * Handle the Bank "created" event.
     * Automatically register new Banks as love reacters and reactables.
     */
    public function created(Bank $bank): void
    {
        if (!$bank->isRegisteredAsLoveReacter()) {
            $bank->registerAsLoveReacter();
        }

        if (!$bank->isRegisteredAsLoveReactant()) {
            $bank->registerAsLoveReactant();
        }
    }
}
