"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("path");
const tempseal_1 = require("@sealcode/tempseal");
const expand_navbar_script_1 = require("./expand-navbar-script");
const prenavbar_cta_1 = require("./prenavbar-cta");
let Navbar;
Navbar = (add_effect, config, { prenavbar_config, items, variant }) => __awaiter(void 0, void 0, void 0, function* () {
    const html = /* HTML */ `
		${prenavbar_config ? yield prenavbar_cta_1.default(prenavbar_config) : ""}

		<nav class="navigation no-desierotkify navigation--${variant}">
			<div class="navigation__body">
				<div class="navigation__header">
					<a href="/"> </a>
				</div>

				<input
					class="navigation__hamburger navigation__hamburger--for-keyboard"
					type="checkbox"
					id="hamburger"
				/>
				<input
					class="navigation__hamburger"
					tabindex="-1"
					type="checkbox"
					id="hamburger-cover"
				/>
				<span class="navigation__icon-wrapper"></span>
				<label class="navigation__label"> </label>
				<span class="navigation__caption">Menu</span>

				<ul class="navigation__wrapper" id="wrapper">
					${items
        .map(({ href, title }) => /* HTML */ `
								<li class="navigation__item">
									<a href="${href}">
										<span class="navigation__text"
											>${title}</span
										>
									</a>
								</li>
							`)
        .join("\n")}
				</ul>
			</div>
			<script type="text/javascript">
				${expand_navbar_script_1.default};
			</script>
		</nav>
	`;
    yield Promise.all([
        tempseal_1.SideEffects.Scss.addFromPath(add_effect, config, path_1.resolve(__dirname, "navbar.scss")),
        add_effect(new tempseal_1.SideEffects.HtmlChunk(html)),
    ]);
});
Navbar.identifier = "navbar";
exports.default = Navbar;
//# sourceMappingURL=navbar.js.map