<?php
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_EditOrder
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */

namespace Mageplaza\EditOrder\Order\Create;

use Magento\Backend\Block\Template\Context;
use Magento\Backend\Helper\Data as BackendHelper;
use Magento\Backend\Model\Session\Quote;
use Magento\Framework\Pricing\PriceCurrencyInterface;
use Magento\Sales\Block\Adminhtml\Order\Create\Coupons as CouponsCore;
use Magento\Sales\Model\AdminOrder\Create;

/**
 * Class Coupons
 * @package Mageplaza\EditOrder\Order\Create
 */
class Coupons extends CouponsCore
{
    /**
     * Coupons constructor.
     *
     * @param Context $context
     * @param Quote $sessionQuote
     * @param Create $orderCreate
     * @param PriceCurrencyInterface $priceCurrency
     * @param BackendHelper $backendHelper
     * @param array $data
     */
    public function __construct(
        Context $context,
        Quote $sessionQuote,
        Create $orderCreate,
        PriceCurrencyInterface $priceCurrency,
        BackendHelper $backendHelper,
        array $data = []
    ) {

        if ($backendHelper->isModuleOutputEnabled('Mageplaza_MultipleCoupons')) {
            $this->setTemplate('Mageplaza_MultipleCoupons::order/create/coupons/form.phtml');
        }
        parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
    }
}
