<?php

namespace ViartasCore\Comments\Providers;

use ViartasCore\Core\Providers\BasePackageServiceProvider;

class CommentsServiceProvider extends BasePackageServiceProvider
{

    /**
     * php artisan vendor:publish --tag=viartas-config --force
     * @var string
     */
    public string $package_directory = __DIR__;

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

    /**
     * @return array
     */
    public function configs(): array
    {
        return [
            'comments' => 'comments',
        ];
    }

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

    /**
     * @return array
     */
    public function css(): array
    {
        return [
            'accounting.*' => [
                [
                    'vendor' => 'viartas-core/comments',
                    'file' => 'resources/css/comments-admin.css',
                    'type' => 'library', //library, module, script
                ],
            ],
            /*'web.*' => [
                [
                    'vendor' => 'viartas-core/comments',
                    'file' => 'resources/css/comments-frontend.css',
                    'type' => 'library', //library, module, script
                ],
            ],*/
        ];
    }
}
