<?php

namespace App\Domain\Workflow\Requirements\Checks;

use App\Domain\Applicants\Models\Applicant;
use App\Domain\Workflow\Requirements\StageRequirement;

class AgentAssigned implements StageRequirement
{
    public function type(): string
    {
        return 'agent_assigned';
    }

    public function describe(array $params): string
    {
        return 'An agent must be assigned to this applicant.';
    }

    public function isSatisfiedBy(Applicant $applicant, array $params): bool
    {
        return $applicant->agent_id !== null;
    }
}
