<?php

namespace App\Listeners;

use App\Modules\Stock\Pinewood;

class AddPinewoodDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private Pinewood $pinewood)
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return array
     */
    public function handle($event)
    {
        if ($this->pinewood->enabled() == false) {
            return [];
        }
        return $this->pinewood->dealershipAdditionalDataFields();
    }
}
