"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 LittleHeader;
LittleHeader = (add_effect, config, { header, description, img_path = path_1.resolve(__dirname, "./logo-purple.svg") }) => __awaiter(void 0, void 0, void 0, function* () {
    const image = yield tempseal_1.SideEffects.File.fromPath(img_path);
    const html = /* HTML */ `
		<section class="little-header">
			<div class="little-header__body">
				<div class="little-header__body-inner">
					<div class="little-header__body-left">
						${header ? `<h2>${header}</h2>` : ``}
						<img
							src="${yield image.getUrlPlaceholder()}"
							alt="img"
						/>
					</div>
					<div class="little-header__body-right">
						<p>${description || ""}</p>
					</div>
				</div>
			</div>
		</section>
	`;
    yield Promise.all([
        add_effect(image),
        tempseal_1.SideEffects.Scss.addFromPath(add_effect, config, path_1.resolve(__dirname, "little-header.scss")),
        add_effect(new tempseal_1.SideEffects.HtmlChunk(html)),
    ]);
});
LittleHeader.identifier = "little-header";
exports.default = LittleHeader;
//# sourceMappingURL=little-header.js.map