<?php

use auctionforge\inc\helpers\LotHelper;
use auctionforge\inc\helpers\SettingsHelper;
use auctionforge\inc\helpers\View;
use auctionforge\inc\controllers\Settings;
if (!defined('ABSPATH')) {
    exit;
}

if (!defined('DONOTCACHEPAGE')) {
    define('DONOTCACHEPAGE', true);
}

get_header();

$auctionBg = "#fff";

$bgImage = get_the_post_thumbnail_url(get_the_ID(), 'full');
$layoutStyle = SettingsHelper::getOption(Settings::LAYOUT_STYLE, 'classic');

do_action('bp_profile_action');
?>
<?php  if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <div class="bp-container-fluid">
        <?php if ($layoutStyle === 'minimal') { ?>
            <div class="bp-header__content-profile-page">
                <h1><?= the_title() ?></h1>
            </div>
        <?php } else { ?>
            <?php if (!empty($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><?= the_title() ?></h1>
                </div>
            </div>
        <?php } ?>
    </div>
    <div class="bp-content bp-justify-between bp-row bp-no-margin bp-add-padding"></div>
    <div id="profile-page" data-bg-color="<?= $auctionBg ?>" class="bp-container tools-wrapper bp-fix-width-lot"></div>
<?php endwhile; ?>
<!-- post navigation -->
<?php else: ?>
<!-- no posts found -->
<?php endif;  ?>

<?php get_footer(); ?>
