"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");
let PageHeader;
PageHeader = (add_effect, config, { header_primary, header_secondary, bg = 1 }) => __awaiter(void 0, void 0, void 0, function* () {
    const background = yield tempseal_1.SideEffects.File.fromPath(path_1.resolve(__dirname, `background${bg}.svg`));
    const seal_with_a_clock = yield tempseal_1.SideEffects.File.fromPath(path_1.resolve(__dirname, "seal-with-a-clock.svg"));
    const html = /* HTML */ `
		<div class="page-header page-header--bg${bg}">
			<div class="page-header__first_layer"></div>
			<div class="page-header__second_layer">
				<img
					src="${yield background.getUrlPlaceholder()}"
					alt="Szczęśliwe foczki"
				/>
			</div>
			<div class="page-header__third_layer"></div>
			<h1 class="page-header__header">
				<p>
					${header_primary || ""} <br />
					<span class="header2">${header_secondary || ""}</span>
				</p>
			</h1>
			<div class="page-header__img">
				<img
					src="${yield seal_with_a_clock.getUrlPlaceholder()}"
					alt=""
					height="250"
				/>
			</div>
		</div>
	`;
    yield Promise.all([
        add_effect(background),
        add_effect(seal_with_a_clock),
        tempseal_1.SideEffects.Scss.addFromPath(add_effect, config, path_1.resolve(__dirname, "page-header.scss")),
        add_effect(new tempseal_1.SideEffects.HtmlChunk(html)),
    ]);
});
PageHeader.identifier = "page-header";
exports.default = PageHeader;
//# sourceMappingURL=page-header.js.map