<?php

namespace Aura\TextBlocks;

use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Aura\TextBlocks\Commands\TextBlocksCommand;
use Eminiarts\Aura\Facades\Aura;

class TextBlocksServiceProvider extends PackageServiceProvider
{
    public function configurePackage(Package $package): void
    {
        /*
         * This class is a Package Service Provider
         *
         * More info: https://github.com/spatie/laravel-package-tools
         */
        $package
            ->name('textblocks')
            ->hasConfigFile()
            ->hasViews()
            ->hasMigration('create_textblocks_table')
            ->hasCommand(TextBlocksCommand::class);

        Aura::registerResources([
            \Aura\TextBlocks\Resources\TextBlock::class,
        ]);
    }
}
