<?php

namespace ViartasThemes\FlorialLanding\Providers;

use ViartasCore\Auth\Controllers\RegisterController;
use ViartasCore\Core\Providers\BaseThemeServiceProvider;
use ViartasCore\Auth\Controllers\LoginController;
use ViartasModules\MainPage\Controllers\MainPageController;
use ViartasThemes\Florial\Modules\Auth\LoginController as LoginControllerFlorial;
use ViartasThemes\FlorialLanding\Modules\MainPage\MainPageController as MainPageControllerFlorial;

class ThemeServiceProvider extends BaseThemeServiceProvider
{
    /**
     * @var string
     */
    public string $package_directory = __DIR__;

    /**
     * @var string
     */
    public string $application = 'web';

    /**
     * @return string[]
     */
    public function controllers(): array
    {
        return [
            LoginController::class => LoginControllerFlorial::class,
            RegisterController::class => \ViartasThemes\Florial\Modules\Auth\RegisterController::class,
            MainPageController::class => MainPageControllerFlorial::class,
        ];
    }

    /**
     * @return string[]
     */
    public function artisanCommands(): array
    {
        return [

        ];
    }

    public function views(): array
    {
        return [
            'web.auth.login' => 'theme.web.modules.auth.login',
            'web.auth.register' => 'theme.web.modules.auth.register',
            'web.main-page.contact-form' => 'theme.web.modules.main-page.contact-form',
            'web.main-page.contacts' => 'theme.web.modules.main-page.contacts',
            'web.main-page.privacy' => 'theme.web.modules.main-page.privacy',
            'web.main-page.taiyskles' => 'theme.web.modules.main-page.taisykles',
        ];
    }

    /**
     * @return array
     */
    public function javascript(): array
    {
        return [
            'web.*' => [
                [
                    'vendor' => 'viartas-js/jquery-validation',
                    'file' => 'resources/js/jquery-validation.js',
                    'type' => 'module', //library, module, script
                    'render_as' => 'commonjs', //module, commonjs
                ],
                [
                    'vendor' => 'viartas-js/jquery-validation',
                    'file' => 'resources/js/core-validator.js',
                    'type' => 'script', //library, module, script
                    'render_as' => 'commonjs', //module, commonjs
                ],
            ],
        ];
    }

    /**
     * @return array
     */
    public function css(): array
    {
        return [
            /*'web.*' => [
                [
                    'vendor' => 'viartas-themes/florial',
                    'file' => 'resources/css/app.css',
                    'type' => 'script', //library, module, script
                ],
                [
                    'vendor' => 'viartas-js/select2',
                    'file' => 'resources/css/select2.css',
                    'type' => 'script', //library, module, script
                ]
            ],*/
        ];
    }

    /**
     * @return array
     */
    public function disabledNodePackages(): array
    {
        return [
            /*'accounting.*' => [
                'viartas-js/jquery',
            ]*/
        ];
    }

    public function icons(): array
    {
        return [
            'web.account.index'          => '<i class="fas fa-chart-line"></i>',        // suvestinė
            'web.account.orders'         => '<i class="fas fa-shopping-cart"></i>',     // užsakymai
            'web.account.profile'        => '<i class="fas fa-user-circle"></i>',       // profilis
            'web.account.customers'      => '<i class="fas fa-users"></i>',             // pirkėjai
            'web.account.addresses'      => '<i class="fas fa-map-marker-alt"></i>',    // adresai
            'web.account.terminals'      => '<i class="fas fa-inbox"></i>',             // paštomatai
            'web.account.wishlist'       => '<i class="fas fa-heart"></i>',             // norų sąrašas
            'web.account.cards'          => '<i class="fas fa-credit-card"></i>',       // kortelės
            'web.account.privacy'        => '<i class="fas fa-user-shield"></i>',       // privatumas
        ];
    }
}
