<?php

use auctionforge\inc\helpers\SettingsHelper;

if (!defined('ABSPATH')) {
    exit;
}
wp_head();
$auctionListKey = 'auction_list';
$pageAuctionListKey = SettingsHelper::getOption($auctionListKey, 0);
$bgImage = get_the_post_thumbnail_url($pageAuctionListKey, 'full');
$pageWelcome = get_post(SettingsHelper::getOption('archive_list', 0));
?>
<div class="bp-container-fluid">
    <?php if ($bgImage != "") { ?>
        <div class="bp-header bp-header-simple bp-row bp-single-page" style="background-image: url('<?= $bgImage ?>')">
    <?php } else { ?>
        <div class="bp-header bp-header-simple bp-row bp-single-page">
    <?php } ?>
        <div class="bp-header__overlay"></div>
        <div class="bp-header__content">
            <h1><?= __("Welcome", "auctionforge") ?>!</h1>
        </div>
    </div>
</div>
<div id="thanks-page" class="bp-container tools-wrapper bp-fix-width-lot">
    <div class="bp-content bp-justify-between bp-row bp-no-margin bp-add-padding"></div>
    <div class=" bp-content bp-justify-between bp-row bp-add-padding">
        <div class="bp-col bp-d-flex bp-md-f-wrap bp-f-center">
            <?= apply_filters('the_content', $pageWelcome->post_content) ?>
        </div>
        <div class="bp-col bp-d-flex bp-md-f-wrap bp-f-center">
            <a class="bp-btn bp-btn-login bp-header__btn" href="/?app_init=1"><?= __("Continue") ?></a>
        </div>
    </div>
</div>
<script>
    (function () {
        setTimeout(function() {
            (function () {
                window.location = window.location.origin + "/?app_init=1";
            })();
        }, 1000);
    })();
</script>
<?php wp_footer(); ?>
