<?php

declare(strict_types=1);

namespace Plugin\tnt_international_phone;

use JTL\Shop;

/*
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
*/
/* PLUGIN STUFF */
$system_account = '';
$db             = Shop::Container()->getDB();
$plugin_pfad    = $db->executeQuery("SELECT cVerzeichnis FROM tplugin WHERE cPluginID LIKE 'tnt_international_phone'", 1);
if (isset($plugin_pfad->cVerzeichnis)) {
    $plugin_pfad = $plugin_pfad->cVerzeichnis;
} else {
    var_dump('Error: Please contact the Plugin Author for more information.');
    exit();
}

$style_url = Shop::getURL() . '/plugins/' . $plugin_pfad . '/adminmenu/css/style.css';
$logo_url  = Shop::getURL() . '/plugins/' . $plugin_pfad . '/adminmenu/img/logo.svg';
?>

<link rel="stylesheet" type="text/css" href="<?php echo $style_url; ?>">

<div class="tnt_autolanguage">
    <nav class="navbar navbar-dark bg-dark flex-md-nowrap p-0 shadow">
        <a class="navbar-brand col-sm-12 col-md-2 mr-0 text-center px-2" href="#">
            <img src="<?php echo $logo_url; ?>"/>
        </a>
        <div class="w-100 text-primary d-flex justify-content-center justify-content-md-end align-items-center pr-3 py-2">
            <a class="btn btn-sm btn-primary mx-2"
               href="https://backoffice.timniko.com/authentication/login">Backoffice</a>
        </div>
    </nav>

    <div class="container-fluid">
        <div class="row">
            <main role="main" class="col-12 px-0">
                <iframe width="100%" height="100%"
                        src="https://backoffice.timniko.com/forms/quote/ca0e1fd65e95d68e69c7a647e552cd8c"
                        frameborder="0" sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin"
                        allowfullscreen style="overflow:hidden;height:100vh;width:100%"></iframe>
            </main>
        </div>
    </div>
</div>

<script>
    $(function () {

    });
</script>
