import * as balIcons from "../../../../../../icons/src/index";
import { h, Host } from "@stencil/core";
import globalScript from "../../../global";
import { balBrowser } from "../../../utils/browser";
import { updateBalIcons } from "../../../utils/config";
/**
 * @internal
 */
export class DocApp {
    constructor() {
        this.logComponents = '';
        this.logLifecycle = true;
        this.logEvents = true;
        this.logRender = true;
        this.logCustom = true;
        this.stickyFooter = false;
        /**
         * Disables all animation inside the bal-app. Can be used for simplify e2e testing.
         */
        this.animated = true;
    }
    connectedCallback() {
        globalScript();
        updateBalIcons(balIcons);
    }
    componentDidRender() {
        const logConfig = {
            components: this.logComponents
                .split(',')
                .map(c => c.trim())
                .filter(c => c !== ''),
            lifecycle: this.logLifecycle,
            event: this.logEvents,
            render: this.logRender,
            custom: this.logCustom,
        };
        if (balBrowser.hasWindow) {
            if (this.logComponents) {
                ;
                window.BaloiseDesignSystem.config.logger = logConfig;
            }
            if (this.region) {
                ;
                window.BaloiseDesignSystem.config.region = this.region;
            }
            if (this.language) {
                ;
                window.BaloiseDesignSystem.config.language = this.language;
            }
        }
    }
    render() {
        return (h(Host, { key: 'f03e1f45113bde8eb77ca4d5582c4fb2ffc214b4' }, h("bal-app", { key: 'ef7e6764d6c8b8cb92305be017ad4d0eccaaab91', animated: this.animated }, h("div", { key: '18a7d115b0fcd3fc48e71a93373dcd28072b22a5', class: { 'has-sticky-footer': this.stickyFooter } }, h("slot", { key: 'bee6be8bfcce72dfa95602ad15505640fd4a10f2' })))));
    }
    static get is() { return "bal-doc-app"; }
    static get originalStyleUrls() {
        return {
            "$": ["bal-doc-app.sass"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bal-doc-app.css"]
        };
    }
    static get properties() {
        return {
            "logComponents": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "log-components",
                "defaultValue": "''"
            },
            "logLifecycle": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "log-lifecycle",
                "defaultValue": "true"
            },
            "logEvents": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "log-events",
                "defaultValue": "true"
            },
            "logRender": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "log-render",
                "defaultValue": "true"
            },
            "logCustom": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "log-custom",
                "defaultValue": "true"
            },
            "stickyFooter": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "sticky-footer",
                "defaultValue": "false"
            },
            "region": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "region"
            },
            "language": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "language"
            },
            "animated": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Disables all animation inside the bal-app. Can be used for simplify e2e testing."
                },
                "getter": false,
                "setter": false,
                "reflect": true,
                "attribute": "animated",
                "defaultValue": "true"
            }
        };
    }
}
