import { h } from "@stencil/core";
export class BpSdkQuoteRequestFees {
    constructor() {
        this.description = undefined;
        this.fees = [];
        this.useExternal = false;
    }
    resetState() { }
    componentWillLoad() {
        this.useExternal = !!customElements.get('bp-sdk-external-quote-request-fees');
        customElements.whenDefined('bp-sdk-external-quote-request-fees').then(() => {
            this.useExternal = true;
        });
    }
    render() {
        return [this.useExternal && this.renderExternal(), !this.useExternal && this.renderInternal()];
    }
    renderExternal() {
        return h("bp-sdk-external-quote-request-fees", { description: this.description, fees: this.fees });
    }
    renderInternal() {
        return (h("section", { class: "bp-sdk-quote-request-fees__container", "aria-description": this.description }, this.fees.map((fee) => (h("bp-sdk-quote-request-price", { description: fee.description, price: fee.amount })))));
    }
    static get is() { return "bp-sdk-quote-request-fees"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bp-sdk-quote-request-fees.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bp-sdk-quote-request-fees.css"]
        };
    }
    static get properties() {
        return {
            "description": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Description for fees"
                },
                "attribute": "description",
                "reflect": false
            },
            "fees": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IQuotePrice[]",
                    "resolved": "IQuotePrice[]",
                    "references": {
                        "IQuotePrice": {
                            "location": "import",
                            "path": "@boldpenguin/sdk-types",
                            "id": "../sdk-types/dist/types.d.ts::IQuotePrice"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "list of fees to render"
                },
                "defaultValue": "[]"
            }
        };
    }
    static get states() {
        return {
            "useExternal": {}
        };
    }
}
