<?php

namespace common\logic\Distribution\Distribution\Module;

use common\logic\AbstractModule;
use common\logic\Distribution\Distribution\Export\DistributionReport2CsvGenerator;
use common\logic\Distribution\Distribution\Export\DistributionReportCsvGenerator;
use common\logic\Distribution\Distribution\Export\DistributionReportGridPdfGenerator;
use common\logic\Distribution\Distribution\Export\DistributionReportPdfGenerator;
use common\logic\Distribution\Distribution\Export\DistributionReportTotalProductCsvGenerator;
use common\logic\Distribution\Distribution\Export\DistributionShoppingCartLabelsPdfGenerator;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\Distribution\Service\DistributionBuilder;
use common\logic\Distribution\Distribution\Service\DistributionDefinition;
use common\logic\Distribution\Distribution\Service\DistributionSolver;
use common\logic\Distribution\Distribution\Service\ExportManager;

/**
 * @mixin DistributionDefinition
 * @mixin DistributionSolver
 * @mixin DistributionRepository
 * @mixin DistributionBuilder
 * @mixin ExportManager
 */
class DistributionModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            DistributionDefinition::class,
            DistributionSolver::class,
            DistributionRepository::class,
            DistributionBuilder::class,

            ExportManager::class,
            DistributionReport2CsvGenerator::class,
            DistributionReportCsvGenerator::class,
            DistributionReportGridPdfGenerator::class,
            DistributionReportPdfGenerator::class,
            DistributionReportTotalProductCsvGenerator::class,
            DistributionShoppingCartLabelsPdfGenerator::class
        ];
    }

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

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

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

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

    public function getExportManager(): ExportManager
    {
        return ExportManager::getInstance();
    }
}