<?php

namespace KupShop\KupShopBundle\Email;

class OrderCreateAdminEmail extends OrderEmail
{
    protected static $name = 'Obchodníkovi při vytvoření objednávky';
    protected static $type = 'ORDER_CREATE_ADMIN';
    protected static $priority = 1;

    protected $subject = 'Nová objednávka {KOD}';
    protected $template = 'email/email_order_create_admin.tpl';

    protected $logSentEmail = false;

    public function setOrder(\Order $order)
    {
        parent::setOrder($order);
        $this->order->fetchItems();

        return $this;
    }

    public function renderEmail($template, $data = [], $base_template = 'admin.tpl'): array
    {
        return parent::renderEmail($template, $data, $base_template);
    }

    public static function getPlaceholders()
    {
        $placeholders = [
            'REKAPITULACE_OBCHODNIKOVI' => [
                'text' => 'Rekapitulace obchodníkovi',
            ],
        ];

        return [self::$type => $placeholders] + (parent::getPlaceholders() ?? []);
    }

    public function getMicrodata(): array
    {
        return [];
    }
}
