<?php

namespace Ecoyn\Setup\Steps;

use QUI;
use QUI\Locale;

use function dirname;

/**
 * Class DistributionType
 * - Business Type
 */
class Finish extends QUI\InstallationWizard\AbstractInstallationWizardStep
{
    public function getTitle(?Locale $Locale = null): string
    {
        if ($Locale === null) {
            $Locale = QUI::getLocale();
        }

        return $Locale->get('ecoyn/core', 'set.up.finish.step.title');
    }

    public function getDescription(?Locale $Locale = null): string
    {
        if ($Locale === null) {
            $Locale = QUI::getLocale();
        }

        return $Locale->get('ecoyn/core', 'set.up.finish.step.description');
    }

    public function create(): string
    {
        $Engine = QUI::getTemplateManager()->getEngine();

        $Engine->assign([
            'urlImageDir' => URL_OPT_DIR . 'ecoyn/core/bin/setup/'
        ]);

        return $Engine->fetch(dirname(__FILE__) . '/Finish.html');
    }
}
