<?php

namespace App\Listeners;

use App\Facades\Settings;

class AddCalltracksFrinchiseFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return array
     */
    public function handle($event)
    {
        if (!Settings::get('crm-calltracks-enabled')) {
            return [];
        }

        return [
            'crm-calltracks-tags' => [
                'type' => 'text',
                'label' => 'Calltracks tags with numbers',
            ],
        ];
    }
}
