import { h } from "@stencil/core";
import { launch } from "@pine-ds/icons/icons";
/**
 * @part link - The main link element that represents the link component.
 * @slot - Content is placed between the opening closing tags.
 */
export class PdsLink {
    constructor() {
        this.componentId = undefined;
        this.external = false;
        this.variant = 'inline';
        this.fontSize = 'lg';
        this.href = undefined;
    }
    classNames() {
        const classNames = ['pds-link'];
        if (this.fontSize) {
            classNames.push('pds-link--' + this.fontSize);
        }
        if (this.variant) {
            classNames.push('pds-link--' + this.variant);
        }
        return classNames.join(' ');
    }
    render() {
        return (h("a", { key: 'de51c27a4c7e3ab6f105f40b683f7c8d1561049c', class: this.classNames(), href: this.href, id: this.componentId, target: this.external ? '_blank' : undefined, part: "link" }, h("slot", { key: '3c4fbcff6544a604d81dd4388a504a902d6ee130' }, this.href), this.external &&
            h("pds-icon", { key: 'fd1acc513efd16134c062ad3845d44be20a911cf', icon: launch, size: this.fontSize })));
    }
    static get is() { return "pds-link"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["pds-link.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pds-link.css"]
        };
    }
    static get properties() {
        return {
            "componentId": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "A unique identifier used for the underlying component `id` attribute."
                },
                "attribute": "component-id",
                "reflect": false
            },
            "external": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "defaultValue",
                            "text": "false"
                        }],
                    "text": "When enabled, opens link in a new tab."
                },
                "attribute": "external",
                "reflect": false,
                "defaultValue": "false"
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'inline' | 'plain'",
                    "resolved": "\"inline\" | \"plain\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "\nModifies the look of the link"
                },
                "attribute": "variant",
                "reflect": false,
                "defaultValue": "'inline'"
            },
            "fontSize": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'sm' | 'md' | 'lg'",
                    "resolved": "\"lg\" | \"md\" | \"sm\"",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "defaultValue",
                            "text": "lg"
                        }],
                    "text": "\nThe Font size follows t-shirt model\nsm: 12px\nmd: 14px\nlg: 16px"
                },
                "attribute": "font-size",
                "reflect": false,
                "defaultValue": "'lg'"
            },
            "href": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The URL that the hyperlink points to."
                },
                "attribute": "href",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=pds-link.js.map
