<?php


namespace Magetop\Advancepreview\Controller\Adminhtml\OrderTracking;


class Items extends \Magetop\Advancepreview\Controller\Adminhtml\OrderTracking
{
    public function execute()
    {
        $response = [
            'status'=>'error',
            'message'=>'Can not load Data',
            'html'=>''
        ];
        try {
            $response['html'] = $this->_view->getLayout()->createBlock('Magetop\Advancepreview\Block\Adminhtml\Order\PreviewOrderTracking')->setTemplate('Magetop_Advancepreview::order/tracking/tracking_items.phtml')->toHtml();
            $response['status'] = 'success';
            $response['message'] = 'Load Data success';
        }
        catch (\Exception $exception) {
            $response['message'] = $exception->getMessage();
        }
        return $this->getAjaxResponse($response);
    }
}
