<?php

namespace KupShop\ReturnsBundle\Page;

use KupShop\ContentBundle\Entity\Placeholder;

class DHLReturnDeliveryPage extends AbstractReturnDeliveryPage
{
    protected static $name = 'Vratka - doprava: DHL';
    protected static $type = 'RETURN_DELIVERY_DHL';

    protected $returnDeliveryClass = 'DHLReturnDelivery';

    public function getUrl(): string
    {
        return path('kupshop_returns_returndeliverypage_returndeliveryinfo', ['returnDeliveryCode' => 'dhl']);
    }

    public function getPlaceholders(): array
    {
        $returnDeliveryLabel = $this->getReturnDeliveryLabel();

        return array_merge([
            new Placeholder('PACKAGE_LABEL', 'ID zásilky', fn () => $returnDeliveryLabel['carrier_id'] ?? '-'),
            new Placeholder('LABEL_URL', 'URL se štítkem', fn () => $returnDeliveryLabel['label_url'] ?? '-'),
        ], parent::getPlaceholders());
    }
}
