import { h } from "@stencil/core";
import { launch } from "@pine-ds/icons/icons";
/**
 * @part link - Link element styles.
 * @slot (default) - Text content placed between the opening and closing tags. If no text is provided, the **href** will be used as a fallback.
 */
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: '0301c40c5571d5713ff50262c9cd288b476bfb02', class: this.classNames(), href: this.href, id: this.componentId, target: this.external ? '_blank' : undefined, part: "link" }, h("slot", { key: 'dae97a17d38c0308d74f75b859d704d0d28d789d' }, this.href), this.external &&
            h("pds-icon", { key: '5c242186e0080db10ede73c232fd83643b54df03', icon: launch, size: this.fontSize })));
    }
    static get is() { return "pds-link"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["../../global/styles/base.scss", "pds-link.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["../../global/styles/base.css", "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": "Determines whether the link should open 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": [{
                            "name": "defaultValue",
                            "text": "inline"
                        }],
                    "text": "Sets the link variant styles."
                },
                "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": "The font size of the link's text."
                },
                "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 hyperlink's destination URL. If no text is provided in the custom slot, the href will be used."
                },
                "attribute": "href",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=pds-link.js.map
