<?php
$data = $data ?? [];
$page = $data["page"] ?? "";
$references = $data["references"] ?? [];
$dropDown = $data["dropDown"] ?? false;
$setting = $data["settings"] ?? [];
$setting = json_decode(json_encode($setting));
$language = $lang ?? 'en';
$logo = $setting->Logo ?? '';
$logo = !empty($logo) ? $logo : ($language == 'tr' ? 'assets/admin/images/dropzone-placeholder/150x50@2x-logo-tr.png' : 'assets/admin/images/dropzone-placeholder/150x50@2x-logo-en.png');

?>
<!doctype html>
<html lang="<?= $language ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!--    <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1">-->
    <meta name="csrf-token" content="<?= $token ?? "" ?>">
    <base href="<?= $baseUrl ?? ''; ?>">
    <link rel="shortcut icon" href="<?= $setting->Favicon ?? '' ?>" type="image/x-icon">
    <title>{{title}} - <?= $setting->Tittle ?? '' ?> </title>
    <meta name="keywords" content="<?= $setting->Keywords ?? '' ?>">
    <meta name="author" content="<?= $setting->Author ?? '' ?>">
    <meta name="publisher" content="<?= $setting->Author ?? '' ?>">
    <meta name="copyright" content="<?= $setting->Author ?? '' ?>">
    <meta name="description" content="<?= $setting->Description ?? '' ?>">
    <meta property="og:title" content="{{title}} - <?= $setting->Tittle ?? '' ?> ">
    <meta property="og:type" content="website">
    <meta property="og:description" content="<?= $setting->Description ?? '' ?>">
    <meta property="og:image" content="<?= $setting->Favicon ?? '' ?>">
    <meta property="og:url" content="<?= $baseUrl ?? ''; ?>">
    <meta property="og:site_name" content="<?= $setting->Tittle ?? '' ?>">
    <meta property="og:locale" content="<?= $language."_".strtoupper($language) ?>">
    <link rel="stylesheet" href="assets/home/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/home/vendors/bootstrap-selector/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="assets/home/vendors/themify-icon/themify-icons.css">
    <link rel="stylesheet" href="assets/home/vendors/flaticon/flaticon.css">
    <link rel="stylesheet" href="assets/home/vendors/animation/animate.css">
    <link rel="stylesheet" href="assets/home/vendors/owl-carousel/assets/owl.carousel.min.css">
    <link rel="stylesheet" href="assets/home/vendors/magnify-pop/magnific-popup.css">
    <link rel="stylesheet" href="assets/home/vendors/nice-select/nice-select.css">
    <link rel="stylesheet" href="assets/home/vendors/elagent/style.css">
    <link rel="stylesheet" href="assets/home/vendors/scroll/jquery.mCustomScrollbar.min.css">
    <?php
    if (isset($data)) {
        echo $data["head"] ?? '';
    }
    ?>
    <link rel="stylesheet" href="assets/home/css/style.css">
    <link rel="stylesheet" href="assets/home/css/responsive.css">
</head>
<body>
<div id="preloader">
    <div id="ctn-preloader" class="ctn-preloader">
        <div class="animation-preloader">
            <div class="spinner"></div>
            <div class="txt-loading">
                {{spinner_text}}
            </div>
            <p class="text-center">{{text_loading}}</p>
        </div>
        <div class="loader">
            <div class="row">
                <div class="col-3 loader-section section-left">
                    <div class="bg"></div>
                </div>
                <div class="col-3 loader-section section-left">
                    <div class="bg"></div>
                </div>
                <div class="col-3 loader-section section-right">
                    <div class="bg"></div>
                </div>
                <div class="col-3 loader-section section-right">
                    <div class="bg"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="body_wrapper">
    <header class="header_area">
        <nav class="navbar navbar-expand-lg menu_one menu_four">
            <div class="container">
                <a class="navbar-brand sticky_logo" href="./">
                    <img src="<?= $logo ?>"
                         srcset="<?= $logo ?> 2x"
                         alt="logo-white">
                    <img src="<?= 'upload/logo/demir-logo-black.png' ?>"
                         srcset="<?= 'upload/logo/demir-logo-black.png' ?> 2x"
                         alt="logo-black">
                </a>
                <button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse"
                        data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    <span class="menu_toggle">
                        <span class="hamburger">
                            <span></span>
                            <span></span>
                            <span></span>
                        </span>
                        <span class="hamburger-cross">
                            <span></span>
                            <span></span>
                        </span>
                    </span>
                </button>
                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <ul class="navbar-nav menu w_menu ms-auto">
                        <li class="nav-item <?= $page==='index' ? 'active' : '' ?> ">
                            <a class="nav-link" href="">{{menu_text_1}}</a>
                        </li>
                        <li class="dropdown submenu nav-item <?= $dropDown ? 'active' : '' ?> "><a title="Pages" class="dropdown-toggle nav-link" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" href="#">{{menu_text_4}}</a>
                            <ul role="menu" class=" dropdown-menu">
                                <li class="nav-item <?= $page==='elzemservissistemi' ? 'active' : '' ?> "><a title="elzemservissistemi" class="nav-link" href="elzemservissistemi">{{menu_text_4_1}}</a></li>
                                <li class="nav-item <?= $page==='elzemgorevyonetimsistemi' ? 'active' : '' ?> "><a title="elzemgorevyonetimsistemi" class="nav-link" href="elzemgorevyonetimsistemi">{{menu_text_4_2}}</a></li>
                            </ul>
                        </li>
                        <li class="nav-item <?= $page==='about' ? 'active' : '' ?>">
                            <a class="nav-link" href="about">{{menu_text_3}}</a>
                        </li>
                        <li class="nav-item <?= $page==='contact' ? 'active' : '' ?>">
                            <a class="nav-link" href="contact">{{menu_text_2}}</a>
                        </li>
                    </ul>

                </div>
            </div>
        </nav>
    </header>