<?php

namespace App\Providers;

use App\Fields\IframeField;
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade;
use Illuminate\Support\ServiceProvider;

class CrudServiceProvider extends ServiceProvider
{
    /**
     * Register services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap services.
     */
    public function boot(): void
    {
        CrudPanelFacade::macro('iframe', function (string $name, string $label, array $options = []) {
            return IframeField::make($name, $label, $options);
        });
    }
}
