<?php
/**
 * Quote index action admin panel.
 *
 * @category  Magetop Extensions
 * @package   Magetop_Quotesystem
 * @author    Magetop Developer
 * @copyright Copyright (c) Magetop (https://www.magetop.com)
 * @license   https://www.magetop.com/license.html
 */

namespace Magetop\Quotesystem\Controller\Adminhtml\Managequotes;

use Magetop\Quotesystem\Controller\Adminhtml\Managequotes as Managequotes;
use Magento\Framework\Controller\ResultFactory;

class ViewQuote extends Managequotes
{
    /**
     * Construct
     *
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Customer\Model\Session $backendSession
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Backend\Model\Session $backendSession
    ) {
        $this->backendSession = $backendSession;
        parent::__construct($context);
    }

    /**
     * Execute
     */
    public function execute()
    {
        $quoteId = $this->_request->getParam('quote_id');
        $this->backendSession->setQuoteId($quoteId);
        $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
        $resultPage->setActiveMenu('Magetop_Quotesystem::quotes');
        $resultPage->getConfig()->getTitle()->prepend(
            __('Quote Details')
        );
        return $resultPage;
    }
}
