import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-148a7577.js';
import { r as randomIdGenerator } from './randomIdGenerator.util-56406f2e.js';

const iconExternalLinkAltCss = ".sc-digi-icon-external-link-alt-h{--digi--icon--color:var(--digi--color--icon--primary);--digi--icon--width:initial;--digi--icon--height:auto;display:flex;min-height:1.4em;align-items:center}.sc-digi-icon-external-link-alt-h svg.sc-digi-icon-external-link-alt{color:var(--digi--icon--color);max-width:var(--digi--icon--width);max-height:var(--digi--icon--height);width:var(--digi--icon--width, auto);height:var(--digi--icon--height, auto)}";
const DigiIconExternalLinkAltStyle0 = iconExternalLinkAltCss;

const IconExternalLinkAlt = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.afTitle = undefined;
        this.afDesc = undefined;
        this.afSvgAriaHidden = true;
        this.afSvgAriaLabelledby = undefined;
        this.titleId = randomIdGenerator('icontitle');
    }
    render() {
        return (h("svg", { key: '08d3bea698b571ea295fe73324e6bae0f63fc318', class: "digi-icon-external-link-alt", width: "29", height: "26", viewBox: "0 0 29 26", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": this.afSvgAriaHidden ? 'true' : 'false', "aria-labelledby": this.afSvgAriaLabelledby
                ? this.afSvgAriaLabelledby
                : this.afTitle
                    ? this.titleId
                    : undefined }, this.afTitle && h("title", { key: '3e621c8f3a5fe78ea4be9f7d8c747e34ee99220d', id: this.titleId }, this.afTitle), this.afDesc && h("desc", { key: 'f186827b927e726c2cb254e4888b1cb99af14a61' }, this.afDesc), h("path", { key: 'fae8674320c20d7a97624347b95f073fa9590cda', class: "digi-icon-external-link-alt__shape", d: "M22.556 12.28v11.283A2.427 2.427 0 0120.139 26H2.417A2.427 2.427 0 010 23.562V5.688A2.427 2.427 0 012.417 3.25h17.117c.538 0 .807.656.427 1.04L18.752 5.51a.602.602 0 01-.427.178H2.72a.303.303 0 00-.302.305v17.266c0 .168.135.305.302.305h17.118a.303.303 0 00.302-.305v-9.76c0-.16.064-.316.177-.43l1.208-1.219a.604.604 0 011.032.431zM28.396 0h-6.847c-.536 0-.807.657-.427 1.04l2.426 2.448L9.844 17.311a.613.613 0 000 .862l1.139 1.149a.6.6 0 00.854 0L25.542 5.499l2.427 2.447A.604.604 0 0029 7.516V.608C29 .273 28.73 0 28.396 0z", fill: "currentColor", "fill-rule": "nonzero" })));
    }
};
IconExternalLinkAlt.style = DigiIconExternalLinkAltStyle0;

const linkExternalCss = ".sc-digi-link-external-h{--digi--link-external--gap:var(--digi--gutter--medium);--digi--link-external--color--default:var(--digi--color--text--interactive--primary);--digi--link-external--color--hover:var(--digi--color--text--interactive--primary);--digi--link-external--color--visited:var(--digi--color--text--interactive--visited);--digi--link-external--font-size:var(--digi--typography--link--font-size--desktop);--digi--link-external--font-family:var(--digi--global--typography--font-family--default);--digi--link-external--font-weight:var(--digi--typography--link-bold--font-weight--desktop);--digi--link-external--text-decoration--default:var(--digi--global--typography--text-decoration--default);--digi--link-external--text-decoration--hover:var(--digi--typography--link--text-decoration--desktop);--digi--link-external--text-decoration--icon--default:var(--digi--global--typography--text-decoration--default);--digi--link-external--text-decoration--icon--hover:var(--digi--typography--link--text-decoration--desktop);--digi--link-external--text-decoration-thickness:0.156em;--digi--link-external--text-underline-offset:3px}.sc-digi-link-external-h .digi-link-external.sc-digi-link-external{--digi--link--gap:var(--digi--link-external--gap);--digi--link--color--default:var(--digi--link-external--color--default);--digi--link--color--hover:var(--digi--link-external--color--hover);--digi--link--color--visited:var(--digi--link-external--color--visited);--digi--link--font-size:var(--digi--link-external--font-size);--digi--link--font-family:var(--digi--link-external--font-family);--digi--link--font-weight:var(--digi--link-external--font-weight);--digi--link--text-decoration--default:var(--digi--link-external--text-decoration--default);--digi--link--text-decoration--hover:var(--digi--link-external--text-decoration--hover);--digi--link--text-decoration--icon--default:var(--digi--link-external--text-decoration--icon--default);--digi--link--text-decoration--icon--hover:var(--digi--link-external--text-decoration--icon--hover)}";
const DigiLinkExternalStyle0 = linkExternalCss;

const LinkExternal = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.afOnClick = createEvent(this, "afOnClick", 7);
        this.afHref = undefined;
        this.afDescribedby = undefined;
        this.afAriaLabel = undefined;
        this.afTarget = undefined;
        this.hideVisitedColor = undefined;
    }
    clickLinkHandler(e) {
        e.stopImmediatePropagation();
        this.afOnClick.emit(e.detail);
    }
    get cssModifiers() {
        return {
            'digi-link--hide-visited': this.hideVisitedColor
        };
    }
    render() {
        return (h(Host, { key: '3aaf01312be823f264d1762d09516ba5e8a43bce' }, h("digi-link", { key: 'a6d51295bb0a550136dba14a93a5e9768951d28b', class: Object.assign({ 'digi-link-external': true }, this.cssModifiers), afHref: this.afHref, onAfOnClick: (e) => this.clickLinkHandler(e), afTarget: this.afTarget, afDescribedby: this.afDescribedby, afAriaLabel: this.afAriaLabel }, h("digi-icon-external-link-alt", { key: '2503e68eb5981dc9828dcf62896ffbc4f53f42f5', class: "digi-link-external__icon", "aria-hidden": "true", slot: "icon" }), h("slot", { key: 'eb4eaebd0114ce3d4896de671e9222d96ddcdba6' }))));
    }
    get hostElement() { return getElement(this); }
};
LinkExternal.style = DigiLinkExternalStyle0;

export { IconExternalLinkAlt as digi_icon_external_link_alt, LinkExternal as digi_link_external };
