<?php

namespace Aura\Export;

use Aura\Export\Commands\ExportCommand;
use Aura\Export\Http\Livewire\ExportSelectedModal;
use Livewire\Livewire;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

class ExportServiceProvider 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('export')
            ->hasConfigFile()
            ->hasViews()
            ->hasMigration('create_export_table')
            ->hasCommand(ExportCommand::class);
    }

    public function packageBooted()
    {
        Livewire::component('export::export-selected-modal', ExportSelectedModal::class);
    }
}
