<?php

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

final class AccountsBtn extends \GriffinForms\Admin\App\Html\Widgets\TitleBar\Format
{
    public function getHtml()
    {
        echo '<div class="position-relative me-2">';
        $this->getSvgIcon();
        echo '</div>';
    }

    private function getSvgIcon()
    {
        $icon_path = $this->config->getRootUrl() . 'admin/images/icons/accounts.svg';

        echo '<button type="button"
                   class="griffinforms-accounts-btn components-button has-icon p-1"
                   aria-label="' . esc_attr(__('Accounts', 'griffinforms-form-builder')) . '"
                   title="' . esc_attr(__('Accounts', 'griffinforms-form-builder')) . '"
                   data-bs-toggle="modal"
                   data-bs-target="#griffinforms-builder-modal-accounts">';
        echo '<img src="' . esc_url($icon_path) . '" alt="' . esc_attr(__('Accounts', 'griffinforms-form-builder')) . '">';
        echo '</button>';
    }

    public function getJs()
    {
    }
}
