'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const __chunk_1 = require('./chunk-91f43df3.js');
const __chunk_5 = require('./chunk-7f924f2f.js');

/**
 * @deprecated Use `ion-router-link` instead.
 */
class Anchor {
    constructor(hostRef) {
        __chunk_1.registerInstance(this, hostRef);
        /**
         * When using a router, it specifies the transition direction when navigating to
         * another page using `href`.
         */
        this.routerDirection = 'forward';
        this.onClick = (ev) => {
            __chunk_5.openURL(this.href, ev, this.routerDirection);
        };
    }
    componentDidLoad() {
        console.warn('The <ion-anchor> component has been deprecated. Please use an <ion-router-link> if you are using a vanilla JS or Stencil project or an <a> with the Angular router.');
    }
    render() {
        const mode = __chunk_1.getIonMode(this);
        const attrs = {
            href: this.href,
            rel: this.rel
        };
        return (__chunk_1.h(__chunk_1.Host, { onClick: this.onClick, class: Object.assign({}, __chunk_5.createColorClasses(this.color), { [mode]: true, 'ion-activatable': true }) }, __chunk_1.h("a", Object.assign({}, attrs), __chunk_1.h("slot", null))));
    }
    static get style() { return ":host{--background:transparent;--color:var(--ion-color-primary,#3880ff);background:var(--background);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}a{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit}"; }
}

exports.ion_anchor = Anchor;
