<?php
use Laminas\Router\Http\Literal;
namespace ArchiveSiteMeta;

return [
    //https://docs.laminas.dev/tutorials/getting-started/routing-and-controllers/
    'router' => [
        'routes' => [
            'archiveSiteMeta' => [
                //'type' => \Laminas\Router\Http\Segment::class,
                'type' => \Laminas\Router\Http\Literal::class,
                'options' => [
                    'route' => '/api/collections/search',
                    'defaults' => [
                        '__NAMESPACE__' => 'ArchiveSiteMeta\Controller',
                        'controller' => Controller\ArchiveSiteMetaController::class,
                        'action'     => 'index',
                    ],
                ],
            ],
        ],
    ],
    'controllers' => [
        'invokables' => [
            'Controller\ArchiveSiteMetaController' => Controller\ArchiveSiteMetaController::class
        ],
    ],
    'view_manager' => [
        'template_path_stack' => [
            dirname(__DIR__) . '/view',
        ],
        'strategies' => [
            'ViewJsonStrategy',
        ],
        'template_map' => [
          // used to remove available blocks when editing a page
          'omeka/site-admin/page/edit' => __DIR__ . '/../../../themes/archive/view/omeka/site-admin/page/edit.phtml',
           //'archive-site-meta/archive-site-meta/index' => __DIR__ . '/../view/collections/index.phtml',
           //'layout/layout' => __DIR__ . '/../../../themes/archive/view/layout/layout.phtml',
           //'omeka/index/index' => __DIR__ . '/../../../themes/archive/view/omeka/site/index/index.phtml',
           //'omeka/search/results' => __DIR__ . '/../../../themes/archive/view/omeka/search/results.phtml',
           //'common/site-list-entry' => __DIR__ . '/../../../themes/archive/view/common/site-list-entry.phtml',
         ],
    ],
    'view_helpers' => [
        'factories' => [
            'archiveSiteMeta' => Service\ViewHelper\ArchiveSiteMetaViewHelperFactory::class,
            //'archiveSiteMeta' => View\Helper\ArchiveSiteMeta::class,
            //'siteCollections' => View\Helper\SiteCollections::class,
        ],
    ],
    'block_layouts' => [
        'factories' => [
            'archiveSiteMeta' => Service\BlockLayout\ArchiveSiteMetaFactory::class,
        ],
    ],
    'form_elements' => [
        'invokables' => [
            Form\ArchiveSiteMetaBlockForm::class => Form\ArchiveSiteMetaBlockForm::class,
        ],
        'factories' => [
            Form\ConfigForm::class => Service\Form\ConfigFormFactory::class,
        ],
    ],
    'config' => [
      'SiteMeta' => [
          'sitemeta_collections' => '',
      ],
    ],
    'DefaultSettings' => [
        'ArchiveSiteMetaBlockForm' => [
            'page_type' => 'home',
            'currator' => '',
            'project_date' => '',
            'collection' => '',
            'wrapStyle' => 'overflow-y: hidden;display: flex;flex-direction: column;justify-content: center;',
        ],
    ]
];