import { faArrowUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
import { h } from "@stencil/core";
export class ExplorerLink {
    constructor() {
        this.iconClass = 'explorer-link-icon';
        this.hasSlotContent = false;
    }
    componentWillLoad() {
        this.hasSlotContent = !!this.hostElement.querySelector('[slot="content"]');
    }
    render() {
        var _a, _b;
        return (h("a", { key: '3fefc8f2c1a10ceaafe9f6ed35f568fa0745bf85', "data-testid": this.dataTestId, href: this.link, target: "_blank", class: { 'mvx:explorer-link': true, [this.class]: Boolean(this.class) }, rel: "noreferrer" }, this.hasSlotContent ? h("slot", { name: "content" }) : (_a = this.text) !== null && _a !== void 0 ? _a : h("mvx-fa-icon", { icon: (_b = this.icon) !== null && _b !== void 0 ? _b : faArrowUpRightFromSquare, class: this.iconClass })));
    }
    static get is() { return "mvx-explorer-link"; }
    static get originalStyleUrls() {
        return {
            "$": ["explorer-link.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["explorer-link.css"]
        };
    }
    static get properties() {
        return {
            "class": {
                "type": "string",
                "attribute": "class",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "iconClass": {
                "type": "string",
                "attribute": "icon-class",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "'explorer-link-icon'"
            },
            "dataTestId": {
                "type": "string",
                "attribute": "data-test-id",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "icon": {
                "type": "unknown",
                "attribute": "icon",
                "mutable": false,
                "complexType": {
                    "original": "IconDefinition",
                    "resolved": "IconDefinition",
                    "references": {
                        "IconDefinition": {
                            "location": "import",
                            "path": "@fortawesome/free-solid-svg-icons",
                            "id": "node_modules::IconDefinition"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            },
            "link": {
                "type": "string",
                "attribute": "link",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "text": {
                "type": "string",
                "attribute": "text",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            }
        };
    }
    static get states() {
        return {
            "hasSlotContent": {}
        };
    }
    static get elementRef() { return "hostElement"; }
}
//# sourceMappingURL=explorer-link.js.map
