<?php

namespace OxygenApp\Views\Frontend\Content;
if (!defined('ABSPATH')) exit;

use OxygenApp\Views\IView;
use OxygenApp\Views\BaseView;
use OxygenApp\Utils\LanguagesHelper;

class FeError extends BaseView implements IView {

    public function render(): void {
        $general_error_title = LanguagesHelper::getInstance()->getLangLabel('general_error_title');
        ?>
        <div class="absolute inset-0 w-full h-full top-0 left-0 z-10 flex items-center justify-center p-4 white-popup hidden fe-error-ui">
            <div class="absolute inset-0 w-full h-full top-0 left-0 z-10 bg-black/20 flex items-center justify-center p-4 white-popup pupup-background-ui">
            </div>
            
            <div class="bg-white z-20 rounded-2xl w-full max-w-md md:max-w-lg lg:max-w-md xl:max-w-sm max-h-full shadow-lg flex flex-col opacity-0 transition-opacity duration-150 popup-content">
                <div class="relative flex items-center justify-center px-4 py-3 border-b">
                    <h2 class="text-xl font-semibold text-gray-600"><?php echo esc_html($general_error_title) ?></h2>
                    
                    <a href="#" class="text-gray-600 absolute right-6 text-clack text-xl leading-none close-btn">
                        <img class="w-[20px]" src="<?php echo esc_url(OXYLEAF_APP_PUBLIC_URL . '/app/Views/Frontend/assets/img/close-black.svg'); ?>" alt="">
                    </a>
                </div>
                
                <div class="overflow-y-auto px-6 py-4 text-gray-600" style="max-height: 70vh;">

                    <div class="fe-error">
                        <div class="p-4 mb-4 text-sm text-red-800 border border-red-300 rounded-lg bg-red-50 fe-error-content" role="alert">
                            
                        </div>
                    </div>

                </div>
            </div>

        </div>
        <?php
    }
}