import { h } from '@stencil/core';
export class RouteLink {
    componentDidLoad() {
        this.postRender();
    }
    componentDidUpdate() {
        this.routeLinkChange.emit({ url: this.url, action: this.action, actionParams: this.actionParams });
        this.postRender();
    }
    postRender() {
        this.registerRouteLink.emit({ url: this.url, action: this.action, actionParams: this.actionParams });
    }
    render() {
        return (h("div", null,
            h("a", { href: '' + this.url },
                h("slot", null))));
    }
    static get is() { return "ema-route-link"; }
    static get properties() { return {
        "dataJson": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "data-json",
            "reflect": false
        },
        "url": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "url",
            "reflect": false
        },
        "action": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "action",
            "reflect": false
        },
        "actionParams": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "action-params",
            "reflect": false
        }
    }; }
    static get states() { return {
        "data": {},
        "state": {}
    }; }
    static get events() { return [{
            "method": "registerRouteLink",
            "name": "registerRouteLink",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "complexType": {
                "original": "any",
                "resolved": "any",
                "references": {}
            }
        }, {
            "method": "routeLinkChange",
            "name": "routeLinkChange",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "complexType": {
                "original": "any",
                "resolved": "any",
                "references": {}
            }
        }]; }
    static get elementRef() { return "el"; }
}
