<?php

namespace Modules\Bitrix\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

use Modules\Main\Models\Agent\Agent;
use Modules\Main\Models\Complex;
class SendAgent extends BitrixSender
{
    use HasFactory;
    public function __construct(Agent $agent)
    {
        $this->addDataItem('name', $agent->user->name);
        $this->addDataItem('phones', [$agent->user->phone]);
        $this->addDataItem('email', $agent->user->email);
        $this->addDataItem('agency_id', $agent->company->bitrixId());
    }
}
