<?php

namespace App\Observers;

use App\Models\Client;

class ClientObserver
{
    public function creating(Client $client): void
    {
        if ($client->profile_media_id !== null) {
            $client->selfie_verified = false;
        }
    }

    public function updating(Client $client): void
    {
        if ($client->isDirty('profile_media_id')) {
            $client->selfie_verified = false;
        }
    }
}
