<?php

namespace Source\Controllers;
use League\Plates\Engine;

/**
 *
 */
class keyNFCe
{
    /**
     * @var Engine
     */
    private $view;

    /**
     * Account constructor.
     */
    public function __construct($router)
    {
        $this->view = Engine::create(__DIR__ . "/../../views/theme", "php");
        $this->view->addData(["router" => $router]);
    }

    /**
     *
     */
    public function index(): void
    {
        echo $this->view->render("xml_key_nfce/index", [
            "title" => "Download NFe Chave | " . SITE['name']
        ]);
    }

    /**
     * @return void
     */
    public function create(): void
    {
        echo $this->view->render("xml_key_nfce/create", [
            "title" => "Download NFe Chave | " . SITE['name']
        ]);
    }

    /**
     * @param $data
     * @return void
     */
    public function key($data): void
    {
        echo $this->view->render("xml_key_nfce/key", [
            "title" => "Download NFe Chave | " . SITE['name'],
            "param" => $data
        ]);
    }

    public function delete($data): void
    {
        echo $this->view->render("xml_key_nfce/delete", [
            "title" => "Download NFe Chave | " . SITE['name'],
            "param" => $data
        ]);
    }
}