<?php

namespace common\logic\Producer\Producer\Module;

use common\logic\AbstractModule;
use common\logic\Producer\Producer\Repository\ProducerRepository;
use common\logic\Producer\Producer\Service\DolibarrProducerUtils;
use common\logic\Producer\Producer\Service\ProducerBuilder;
use common\logic\Producer\Producer\Service\ProducerDefinition;
use common\logic\Producer\Producer\Service\ProducerPageSizer;
use common\logic\Producer\Producer\Service\ProducerSolver;
use common\logic\Producer\Producer\Service\ProducerManager;

/**
 * @mixin ProducerDefinition
 * @mixin ProducerSolver
 * @mixin ProducerRepository
 * @mixin ProducerBuilder
 * @mixin ProducerManager
 * @mixin ProducerPageSizer
 * @mixin DolibarrProducerUtils
 */
class ProducerModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            ProducerDefinition::class,
            ProducerSolver::class,
            ProducerRepository::class,
            ProducerBuilder::class,
            ProducerManager::class,
            ProducerPageSizer::class,
            DolibarrProducerUtils::class,
        ];
    }

    public function getDefinition(): ProducerDefinition
    {
        return ProducerDefinition::getInstance();
    }

    public function getSolver(): ProducerSolver
    {
        return ProducerSolver::getInstance();
    }

    public function getRepository(): ProducerRepository
    {
        return ProducerRepository::getInstance();
    }

    public function getBuilder(): ProducerBuilder
    {
        return ProducerBuilder::getInstance();
    }

    public function getUtils(): ProducerManager
    {
        return ProducerManager::getInstance();
    }

    public function getProducerPageSizer(): ProducerPageSizer
    {
        return ProducerPageSizer::getInstance();
    }

    public function getDolibarrUtils(): DolibarrProducerUtils
    {
        return DolibarrProducerUtils::getInstance();
    }
}