<?php

use Lean\Console\Lib\DatabaseMigrations;

$path = dirname(__DIR__, 2);

return [
    'lean.console' => [
        'picea' => [
            'context' => Lean\Console\View::class,

            'view' => [
                [
                    'path' => implode(DIRECTORY_SEPARATOR, [ $path , "view", '' ]),
                    'order' => 99,
                ],
            ],

            'asset' => [
                [
                    'path' => implode(DIRECTORY_SEPARATOR, [ $path, "asset", '' ]),
                    'order' => 10
                ],
            ],
        ],

        'ulmus' => [
            'entities' => [
                'Lean\\Console\\Entity\\Firewall' => implode(DIRECTORY_SEPARATOR, [ $path , "src", "Entity", "Firewall" ]),
            ],
        ],

        'tell' => [
            'json' => [
                [
                    'path' => implode(DIRECTORY_SEPARATOR, [ $path, "meta", "i18n", "" ]),
                    'order' => 99,
                ],
            ]
        ],

        'routes' => ! getenv('DEBUG') ? [] : [
            'Lean\\Console\\Controller' => implode(DIRECTORY_SEPARATOR, [ $path, "src", "Controller", "" ]),
        ],
    ],

    DatabaseMigrations::class => function($c) {
        return new DatabaseMigrations( $c->get(Lean\Lean::class)->getEntities() );
    },
];