<?php

namespace GriffinForms\Admin\Html\Pages\Single;

class Folder extends \GriffinForms\Admin\Html\Pages\Single\Format
{   
    protected $type = 'folder';
    
    public function itemOptions()
    {
        echo '<div class="container border-bottom griffinforms-item-options w-75 mt-3 pt-3">';
        $this->optionsHeader('icon_heading');
        $this->getOption('icon');
        echo '</div>';    }

    /**
     * Render the back button for folder editor.
     */
    protected function backToListBtn()
    {
        $this->buttons->bsBtn([
            'class' => 'gf-back-to-folders-btn gf-btn-light mb-3',
            'label' => $this->lang->getText('Back to folders'),
            'link'  => admin_url('admin.php?page=griffinforms-folders'),
            'icon'  => 'list'
        ]);
    }

    protected function icon()
{
    $field = new \GriffinForms\Admin\Html\FormControls\FolderIcon($this->prop, $this->value);
    $field->html();
}
}