<?php

namespace MintyPHP\Service\AddressBook;

use MintyPHP\Repository\CustomField\TenantCustomFieldOptionRepository;
use MintyPHP\Service\CustomField\UserCustomFieldValueService;

class AddressBookCustomFieldGateway
{
    public function extractFilterSpec(array $query, int $currentUserId): array
    {
        return UserCustomFieldValueService::extractAddressBookFilterSpec($query, $currentUserId);
    }

    public function listOptionsByDefinitionIds(array $definitionIds, bool $activeOnly = true): array
    {
        return TenantCustomFieldOptionRepository::listByDefinitionIds($definitionIds, $activeOnly);
    }
}
