<?php

declare (strict_types=1);
namespace PoPCMSSchema\Pages\TypeResolvers\InputObjectType;

use PoP\Root\App;
use PoPCMSSchema\CustomPosts\TypeResolvers\InputObjectType\CustomPostPaginationInputObjectTypeResolver;
use PoPCMSSchema\Pages\Module;
use PoPCMSSchema\Pages\ModuleConfiguration;
/** @internal */
class PagePaginationInputObjectTypeResolver extends CustomPostPaginationInputObjectTypeResolver
{
    public function getTypeName() : string
    {
        return 'PagePaginationInput';
    }
    public function getTypeDescription() : ?string
    {
        return $this->__('Input to paginate pages', 'pages');
    }
    protected function getDefaultLimit() : ?int
    {
        /** @var ModuleConfiguration */
        $moduleConfiguration = App::getModule(Module::class)->getConfiguration();
        return $moduleConfiguration->getPageListDefaultLimit();
    }
    protected function getMaxLimit() : ?int
    {
        /** @var ModuleConfiguration */
        $moduleConfiguration = App::getModule(Module::class)->getConfiguration();
        return $moduleConfiguration->getPageListMaxLimit();
    }
}
