<?php

namespace common\logic\Setting;

use common\logic\AbstractModule;
use common\logic\Setting\SettingDetails\Admin\AdminSettingDefinition;
use common\logic\Setting\SettingDetails\Producer\ProducerSettingDefinition;

class SettingModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            SettingDefinition::class,
            AdminSettingDefinition::class,
            ProducerSettingDefinition::class,
            SettingRepository::class,
            SettingBuilder::class,
            SettingImporter::class,
            AdminSettingBag::class
        ];
    }

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

    public function getAdminSettingDefinition(): AdminSettingDefinition
    {
        return AdminSettingDefinition::getInstance();
    }

    public function getProducerSettingDefinition(): ProducerSettingDefinition
    {
        return ProducerSettingDefinition::getInstance();
    }

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

    public function getImporter(): SettingImporter
    {
        return SettingImporter::getInstance();
    }

    public function getAdminSettingBag(): AdminSettingBag
    {
        return AdminSettingBag::getInstance();
    }
}