<?php

namespace App\Modules\ControllerLogic\Contacts;

use App\Classes\Constants;
use App\Classes\Modules\Contacts\Services\ListsContact;

class ListContactLogic
{

    /** @var  ListsContact */
    private $listsContacts;

    /**
     * ListContactLogic constructor.
     * @param ListsContact $listsContacts
     */
    public function __construct(ListsContact $listsContacts)
    {
        $this->listsContacts = $listsContacts;
    }


    /**
     * @param $type
     * @param $referenceId
     * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
     */
    public function execute($type, $referenceId){

        return $this->listsContacts->execute(Constants::MODULE_TYPES[$type], $referenceId);

    }


}