<?php

namespace GriffinForms\Admin\App\Html\Containers;

final class PresentationArea extends \GriffinForms\Admin\App\Html\Containers\Format
{
        /**
     * Defines widgets for presentation area container.
     * @see html\widgets\presentationarea\
     */
    protected function setWidgets()
    {
        $this->widgets = array(
            'forms_table',
            'form_layout'
        );
    }

    public function getHtml()
    {
        echo '<div id="' . esc_html($this->getHtmlId()) . '" class="flex-fill px-4">';
        $this->widgets['forms_table']->getHtml();
        $this->widgets['form_layout']->getHtml();
        echo '</div>';
    }

    /**
     * All JS gathered from this function is sent to landingpage JS
     * 
     * @see LandingPage::AppJs() 
     */
    public function getJs()
    {
        $this->widgets['forms_table']->getJs();
        $this->widgets['form_layout']->getJs();
    }

}