<?php

namespace App\Listeners;

use App\Facades\Settings;

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

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

        return [
            'google-store-code' => [
                'type' => 'text',
                'label' => 'Google Store Code'
            ],
        ];
    }
}
