/*!
 * Built by Revolist OU ❤️
 */
import { Host, h, } from "@stencil/core";
/**
 * VNode to html converter for stencil components.
 * Transform VNode to html string.
 */
/**
 * @internal
 */
export class VNodeToHtml {
    constructor() {
        this.redraw = null;
        this.vnodes = [];
    }
    componentDidRender() {
        this.html.emit({
            html: this.el.innerHTML,
            vnodes: this.vnodes,
        });
    }
    render() {
        var _a, _b;
        this.vnodes = (_b = (_a = this.redraw) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : null;
        return (h(Host, { key: '11b76ca8a86ebf279add88bbd86ef9eb5149605a', style: { visibility: 'hidden', position: 'absolute' } }, this.vnodes));
    }
    static get is() { return "vnode-html"; }
    static get properties() {
        return {
            "redraw": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "(() => VNode[]) | null | undefined",
                    "resolved": "(() => VNode[]) | null | undefined",
                    "references": {
                        "VNode": {
                            "location": "import",
                            "path": "@stencil/core",
                            "id": "node_modules::VNode",
                            "referenceLocation": "VNode"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "defaultValue": "null"
            }
        };
    }
    static get events() {
        return [{
                "method": "html",
                "name": "html",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "{ html: string; vnodes: (VNode[]) | null }",
                    "resolved": "{ html: string; vnodes: VNode[] | null; }",
                    "references": {
                        "VNode": {
                            "location": "import",
                            "path": "@stencil/core",
                            "id": "node_modules::VNode",
                            "referenceLocation": "VNode"
                        }
                    }
                }
            }];
    }
    static get elementRef() { return "el"; }
}
