<?php

/**
 * Copyright © 2024 Mimocodes. All rights reserved.
 */

namespace Aman\AmanAccept\Block\Adminhtml\Config;

use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Config\Block\System\Config\Form\Field;
 
class Disable extends Field
{    
    protected $urlBuilder;

    protected function _getElementHtml(AbstractElement $element)
    {
        $this->urlBuilder = \Magento\Framework\App\ObjectManager::getInstance()
        ->get('Magento\Framework\UrlInterface');

        $element->setData('readonly', 1);
        $element->setData('value', $this->urlBuilder->getBaseUrl() . "rest/default/V1/payload/payload-api");
        return $element->getElementHtml();
    }
}
