import { p as proxyCustomElement, H, h } from './p-a53686b3.js';
import { j as FormReceiptVariation, i as FormReceiptType, h as FormReceiptHeadingLevel } from './p-5a256d98.js';
import './p-717306ef.js';
import './p-a4a001e1.js';
import './p-f518a4cf.js';
import './p-7e32c40b.js';
import './p-dcdffb3c.js';
import './p-5d21a361.js';
import './p-ad16c7a1.js';
import './p-f40f4b2a.js';
import './p-1f68d501.js';
import './p-ee88e3f1.js';
import './p-8142cc73.js';
import './p-905ccb30.js';
import './p-bc3d2778.js';
import './p-c8429245.js';
import './p-06625463.js';
import './p-f447b984.js';
import './p-9c5a93d8.js';
import './p-7933b555.js';
import './p-0f6c0360.js';
import './p-814ca2ad.js';
import { a as LayoutBlockVariation } from './p-d8a98b3b.js';
import './p-07303cb5.js';
import './p-5f8dc01a.js';
import './p-2a023831.js';
import './p-5ba6737a.js';
import './p-e4a9f8f0.js';
import './p-f2a6768b.js';
import './p-40657c82.js';
import './p-f600576a.js';
import './p-3b20ec86.js';
import './p-9dd5d6c8.js';
import './p-77a93845.js';
import './p-06f939ab.js';
import './p-8cd2d6dd.js';
import './p-484a1d6d.js';
import './p-0f3fbb1e.js';
import './p-820e795b.js';
import './p-46cbbcb5.js';
import './p-d74742b8.js';
import './p-6e383896.js';
import './p-4bad4fb0.js';
import './p-d1886fff.js';
import './p-a6ca40fc.js';
import './p-b0e88537.js';
import './p-cdcaf0eb.js';
import { d as defineCustomElement$3 } from './p-9f314511.js';
import { d as defineCustomElement$2 } from './p-b1fc42ea.js';

const formReceiptCss = ".sc-digi-form-receipt-h{--digi--receipt--background-color:var(--digi--color--background--pop-out);--digi--receipt--margin:var(--digi--padding--small);--digi--receipt--padding-top:var(--digi--padding--large);--digi--receipt--padding-bottom:var(--digi--padding--largest);--digi--receipt--padding-top--desktop:var(--digi--padding--largest-2);--digi--receipt--padding-bottom--desktop:var(--digi--padding--largest-3);--digi--receipt--padding-horizontal:var(--digi--padding--medium);--digi--receipt--heading--color:var(--digi--color--text--primary);--digi--receipt--heading--font-size:var(--digi--typography--heading-2--font-size--mobile);--digi--receipt--heading--font-size--desktop:var(--digi--typography--heading-1--font-size--desktop-large);--digi--receipt--heading--font-weight:var(--digi--typography--heading-2--font-weight--mobile);--digi--receipt--heading--font-weight--desktop:var(--digi--typography--heading-1--font-weight--desktop);--digi--receipt--heading--font-family:var(--digi--global--typography--font-family--default)}.sc-digi-form-receipt-h .digi-form-receipt.sc-digi-form-receipt{background-color:var(--digi--receipt--background-color);display:grid;padding-top:var(--digi--receipt--padding-top);padding-bottom:var(--digi--receipt--padding-bottom)}@media (min-width: 61.9375rem){.sc-digi-form-receipt-h .digi-form-receipt.sc-digi-form-receipt{padding-top:var(--digi--receipt--padding-top--desktop);padding-bottom:var(--digi--receipt--padding-bottom--desktop)}}.sc-digi-form-receipt-h .digi-form-receipt--grid.sc-digi-form-receipt{padding-left:var(--digi--receipt--padding-horizontal);padding-right:var(--digi--receipt--padding-horizontal)}.sc-digi-form-receipt-h .digi-form-receipt--center.sc-digi-form-receipt .digi-form-receipt__content.sc-digi-form-receipt{display:flex;flex-direction:column;align-items:center}.sc-digi-form-receipt-h .digi-form-receipt__content.sc-digi-form-receipt{grid-column:1;grid-row:1}.sc-digi-form-receipt-h .digi-form-receipt__body.sc-digi-form-receipt{display:flex;flex-direction:column}.sc-digi-form-receipt-h .digi-form-receipt__heading.sc-digi-form-receipt{font-family:var(--digi--receipt--heading--font-family);font-size:var(--digi--receipt--heading--font-size);font-weight:var(--digi--receipt--heading--font-weight);margin-top:0;margin-bottom:0;display:block;color:var(--digi--receipt--heading--color)}@media (min-width: 61.9375rem){.sc-digi-form-receipt-h .digi-form-receipt__heading.sc-digi-form-receipt{font-size:var(--digi--receipt--heading--font-size--desktop);font-weight:var(--digi--receipt--heading--font-weight--desktop)}}.sc-digi-form-receipt-h .digi-form-receipt__icon.sc-digi-form-receipt{width:2.125rem;height:1.75rem;margin-bottom:var(--digi--receipt--margin)}@media (min-width: 61.9375rem){.sc-digi-form-receipt-h .digi-form-receipt__icon.sc-digi-form-receipt{width:2.75rem;height:2.25rem}}.sc-digi-form-receipt-h .digi-form-receipt__infographic-primary.sc-digi-form-receipt{fill:var(--digi--color--infographic--brand--primary)}.sc-digi-form-receipt-h .digi-form-receipt__slot-wrapper.sc-digi-form-receipt{display:flex;flex-direction:column;gap:1rem}.sc-digi-form-receipt-h .digi-form-receipt__slot-wrapper-has-content.sc-digi-form-receipt{padding-top:1.5rem}.sc-digi-form-receipt-s .digi-form-receipt__slot-wrapper-center-text{text-align:center}";
const DigiFormReceiptStyle0 = formReceiptCss;

const FormReceipt = /*@__PURE__*/ proxyCustomElement(class FormReceipt extends H {
    constructor() {
        super();
        this.__registerHost();
        this.afText = '';
        this.afVariation = FormReceiptVariation.FULLWIDTH;
        this.afType = FormReceiptType.CENTER;
        this.afHeadingLevel = FormReceiptHeadingLevel.H2;
        this.hasDefaultSlot = false;
    }
    componentDidLoad() {
        this.checkSlotContent();
    }
    checkSlotContent() {
        var _a;
        const slotWrapper = (_a = this.hostElement) === null || _a === void 0 ? void 0 : _a.querySelector('.digi-form-receipt__slot-wrapper');
        if (!slotWrapper)
            return;
        this.hasDefaultSlot = slotWrapper.innerHTML.trim() !== '';
        if (this.afType === FormReceiptType.CENTER) {
            const typographyElements = slotWrapper.querySelectorAll(':scope > .hydrated');
            const buttonElements = slotWrapper.querySelectorAll(':scope > .sc-digi-button-h');
            buttonElements.forEach((element) => {
                element.classList.add('digi-form-receipt__slot-wrapper-center-text');
            });
            typographyElements.forEach((element) => {
                const typography = element.querySelector(':scope > .digi-typography');
                if (typography) {
                    typography.classList.add('digi-form-receipt__slot-wrapper-center-text');
                }
            });
        }
    }
    get cssModifiers() {
        return {
            'digi-form-receipt--fullwidth': this.afVariation === FormReceiptVariation.FULLWIDTH,
            'digi-form-receipt--grid': this.afVariation === FormReceiptVariation.GRID,
            'digi-form-receipt--center': this.afType === FormReceiptType.CENTER,
            'digi-form-receipt--start': this.afType === FormReceiptType.START
        };
    }
    get slotContent() {
        return (h("div", { class: {
                'digi-form-receipt__slot-wrapper': true,
                'digi-form-receipt__slot-wrapper-has-content': this.hasDefaultSlot
            } }, h("slot", null)));
    }
    get content() {
        return (h("div", { class: "digi-form-receipt__content" }, h("svg", { class: "digi-form-receipt__icon", "aria-hidden": "true", version: "1.1", viewBox: "0 0 35 29" }, h("title", null, "Check mark"), h("g", { fill: "none", "fill-rule": "evenodd" }, h("g", { transform: "translate(-170 -32)" }, h("g", { transform: "translate(170 32.325)" }, h("g", { transform: "translate(0 .77495)" }, h("mask", { id: "b", fill: "white" }, h("polygon", { points: "0 0 26.685 0 26.685 27.689 0 27.689" })), h("path", { d: "m13.711 27.689c-7.5602 0-13.711-6.2103-13.711-13.844 0-7.6345 6.151-13.845 13.711-13.845 3.1693 0 6.2611 1.1179 8.7048 3.1478l-1.5894 1.9509c-1.9972-1.6592-4.5241-2.5724-7.1155-2.5724-6.181 0-11.209 5.0773-11.209 11.319 0 6.2406 5.0283 11.318 11.209 11.318 4.7924 0 9.0551-3.0733 10.607-7.6478l2.3668 0.81853c-1.8983 5.5958-7.1124 9.3556-12.974 9.3556", fill: "#333", mask: "url(#b)" })), h("g", { transform: "translate(4.2177)" }, h("mask", { id: "a", fill: "white" }, h("polygon", { points: "0 0 30.425 0 30.425 23.496 0 23.496" })), h("path", { class: "digi-form-receipt__infographic-primary", d: "m30.191 3.2545-19.95 20.007c-0.31227 0.31253-0.81758 0.31253-1.1292 0l-8.878-8.9033c-0.31164-0.31316-0.31164-0.81992 0-1.1324l1.8818-1.8878c0.31164-0.31253 0.81758-0.31253 1.1292 0l6.4315 6.4499 17.504-17.553c0.31164-0.31316 0.81695-0.31316 1.1292 0l1.8818 1.8872c0.31164 0.31253 0.31164 0.81929 0 1.1324", fill: "#95C13E", mask: "url(#a)" })))))), h(this.afHeadingLevel, { class: "digi-form-receipt__heading", tabIndex: -1 }, this.afText), this.slotContent));
    }
    render() {
        return (h("div", { key: 'd202410625db1ed892a364374b1516df522df2f6', class: Object.assign({ 'digi-form-receipt': true }, this.cssModifiers) }, this.afVariation === FormReceiptVariation.FULLWIDTH ? (h("digi-layout-block", { afVariation: LayoutBlockVariation.TRANSPARENT }, this.content)) : (this.content)));
    }
    get hostElement() { return this; }
    static get style() { return DigiFormReceiptStyle0; }
}, [6, "digi-form-receipt", {
        "afText": [1, "af-text"],
        "afVariation": [1, "af-variation"],
        "afType": [1, "af-type"],
        "afHeadingLevel": [1, "af-heading-level"],
        "hasDefaultSlot": [32]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["digi-form-receipt", "digi-layout-block", "digi-layout-container"];
    components.forEach(tagName => { switch (tagName) {
        case "digi-form-receipt":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, FormReceipt);
            }
            break;
        case "digi-layout-block":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "digi-layout-container":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
    } });
}

const DigiFormReceipt = FormReceipt;
const defineCustomElement = defineCustomElement$1;

export { DigiFormReceipt, defineCustomElement };
