<?php

namespace LaraBB\Settings\UI\Web\Handlers\Admin\Prefix;

use Illuminate\Contracts\View\View;
use Illuminate\View\Factory;
use LaraBB\Settings\Actions\Prefix\CreateAction;

/**
 * Class CreateHandler
 * @package LaraBB\Settings\UI\Web\Handlers\Admin\Prefix
 */
class CreateHandler
{
    /**
     * CreateHandler constructor.
     * @param CreateAction $createAction
     * @param Factory $view
     */
    public function __construct(private readonly CreateAction $createAction, private readonly Factory $view)
    {

    }

    /**
     * @return View
     */
    public function __invoke(): View
    {
        return $this->view->make('settings::admin.prefix.create-edit', $this->createAction->run());
    }
}
