import { h, Host } from "@stencil/core";
import { open_in_new } from "pn-design-assets/pn-assets/icons.js";
export class PnProductCardPrice {
    constructor() {
        this.label = undefined;
        this.amount = undefined;
        this.currency = undefined;
        this.note = undefined;
        this.url = undefined;
        this.service = undefined;
        this.linkid = undefined;
    }
    render() {
        if (!this.amount) {
            return;
        }
        return this.url ? (h(Host, { id: this.linkid }, h("div", { class: "price" }, this.amount ? h("span", null, this.amount) : null, this.currency ? h("span", null, ' ' + this.currency) : null), this.note ? h("p", null, this.note) : null, this.label ? (h("pn-button", { id: 'pricecta-' + this.linkid, small: "true", icon: open_in_new, appearance: "light", href: this.url, target: "_blank" }, this.label)) : null)) : (h(Host, null, h("div", { class: "price" }, this.amount ? h("span", null, this.amount) : null, this.currency ? h("span", null, this.currency) : null)));
    }
    static get is() { return "pn-product-card-price"; }
    static get originalStyleUrls() {
        return {
            "$": ["pn-product-card-price.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pn-product-card-price.css"]
        };
    }
    static get properties() {
        return {
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "label",
                "reflect": false
            },
            "amount": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "amount",
                "reflect": false
            },
            "currency": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "currency",
                "reflect": false
            },
            "note": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "note",
                "reflect": false
            },
            "url": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "url",
                "reflect": false
            },
            "service": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "service",
                "reflect": false
            },
            "linkid": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "linkid",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=pn-product-card-price.js.map
