<?php

namespace GriffinForms\Admin\App\Html\Widgets\TitleBar;

final class FormThemesBtn extends \GriffinForms\Admin\App\Html\Widgets\TitleBar\Format
{
    public function getHtml()
    {
        $form_id = isset($_GET['form_id']) ? absint(wp_unslash($_GET['form_id'])) : 0;
        if (!$form_id) {
            return;
        }

        $icon_url = $this->config->getRootUrl() . 'admin/images/icons/accordion-note.svg';

        echo '<button type="button"';
        echo ' class="gf-titlebar-btn gf-titlebar-btn-formoptions"';
        echo ' aria-label="' . esc_attr(__('Form Options', 'griffinforms-form-builder')) . '"';
        echo ' data-bs-toggle="modal" data-bs-target="#griffinforms-builder-modal-formoptions">';
        echo '<img src="' . esc_url($icon_url) . '" alt="" width="16" height="16">';
        echo esc_html__('Form Options', 'griffinforms-form-builder');
        echo '</button>';
    }

    public function getJs()
    {
    }
}
