<?php


namespace Magetop\Advancepreview\Controller\Adminhtml\PreviewAdditionalTab;


class Edit extends \Magetop\Advancepreview\Controller\Adminhtml\PreviewAdditionalTab
{
    public function execute()
    {
        $response = [
            'status'=>'error',
            'html'=>''
        ];
        try {
            $response['html'] = $this->_view->getLayout()->createBlock('Magetop\Advancepreview\Block\Adminhtml\Product\Edit\PreviewAdditionalTab')->setTemplate('Magetop_Advancepreview::product/addition_tab/edit.phtml')->toHtml();
            $response['status'] = 'success';
        }
        catch (\Exception $exception) {
            $response['html'] = $exception->getMessage();
        }
        return $this->getAjaxResponse($response);
    }
}
