<?php

declare(strict_types=1);

namespace FiloBlu\Storelocator\Block\PickUpInStore;


use Magento\Framework\Url;

/**
 *
 */
class Template extends \Magento\Framework\View\Element\Template
{

    /**
     * @var Url
     */
    private $urlBuilder;

    public function __construct(
        Url                                      $urlBuilder,
        \Magento\Framework\View\Element\Template\Context $context, array $data = []
    )
    {
        $this->urlBuilder = $urlBuilder;
        \Magento\Framework\View\Element\Template::__construct($context, $data);
    }

    /**
     * @return string
     */
    public function getOrderConfirmedReceivedLink()
    {
        return $this->urlBuilder->getUrl(
            'storelocator/pickupinstore/confirmreceived', [
                'hash' => $this->getDataByPath('order_data/pickup_in_store_hash'),
                '_scope' => $this->getDataByPath('order_data/store_id')
            ]
        );
    }

    /**
     * @return string
     */
    public function getOrderConfirmedLink()
    {
        return $this->urlBuilder->getUrl(
            'storelocator/pickupinstore/confirm', [
                'hash' => $this->getDataByPath('order_data/pickup_in_store_hash'),
                '_scope' => $this->getDataByPath('order_data/store_id')
            ]
        );
    }

    /**
     * @return string
     */
    public function getRmaConfirmReceivedLink()
    {
        return $this->urlBuilder->getUrl(
            'storelocator/pickupinstore/rmareceived', [
                'hash' => $this->getDataByPath('rma_data/return_to_store_hash'),
                '_scope' => $this->getDataByPath('rma_data/store_id')
            ]
        );
    }

    /**
     * @return string
     */
    public function getRmaRefusedLink()
    {
        return $this->urlBuilder->getUrl(
            'storelocator/pickupinstore/rmarefused', [
                'hash' => $this->getDataByPath('rma_data/return_to_store_hash'),
                '_scope' => $this->getDataByPath('rma_data/store_id')

            ]
        );
    }

    /**
     * @return string
     */
    public function getRmaReceivedLink()
    {
        return $this->urlBuilder->getUrl(
            'storelocator/pickupinstore/rmareceived', [
                'hash' => $this->getDataByPath('rma_data/return_to_store_hash'),
                '_scope' => $this->getDataByPath('rma_data/store_id')
            ]
        );
    }

}
