<?php


namespace Magetop\Advancepreview\Controller\Adminhtml\PreviewDailyShipping;


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