"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 obfuscate_html_attr_1 = require("@sealcode/obfuscate-html-attr");
const contact_1 = require("../contact/contact");
let ContactSection;
ContactSection = (add_effect, config, { headline, contact_params, description, email_address }) => __awaiter(void 0, void 0, void 0, function* () {
    const html = /* HTML */ `
		<section class="contact-section">
			<div class="contact-section__body">
				<div class="contact-section__left-side">
					${headline
        ? "<h2 class='contact-section__headline'>" +
            headline +
            "</h2>"
        : ""}
					${yield tempseal_1.embedComponent(add_effect, config, contact_params, contact_1.default)}
				</div>
				<div class="contact-section__right-side">
					${description ? "<p>" + description + "</p>" : ""}
					<div class="contact-section__right-side--mail">
						<span
							class="contact-section__right-side--mail-icon"
						></span>
						<a href="mailto:${obfuscate_html_attr_1.default(email_address)}"
							>${obfuscate_html_attr_1.default(email_address)}</a
						>
					</div>
				</div>
			</div>
		</section>
	`;
    yield Promise.all([
        tempseal_1.SideEffects.Scss.addFromPath(add_effect, config, path_1.resolve(__dirname, "contact-section.scss")),
        add_effect(new tempseal_1.SideEffects.HtmlChunk(html)),
    ]);
});
ContactSection.identifier = "contact-section";
exports.default = ContactSection;
//# sourceMappingURL=contact-section.js.map