import { h, Host } from "@stencil/core";
import { search } from "pn-design-assets/pn-assets/icons.js";
export class PnSpotlight {
    constructor() {
        this.formActionUrl = null;
        this.heading = 'Track your parcel';
        this.buttonLabel = null;
        this.locale = 'en';
        this.placeholder = 'Enter shipment ID';
        this.inputName = 'shipmentID';
        this.currentWidth = window.innerWidth;
    }
    hostElement;
    handleViewportSizeChange(event) {
        this.currentWidth = event.target.innerWidth;
    }
    render() {
        return (h(Host, { key: '9e19eb36a77777d651f61085a8552f9aa8310b79' }, h("div", { key: '73ef3e4cda0a382e79270e2c43f4ddaa8bcd4414', class: "pn-parcel-tracker__container" }, h("form", { key: '66349ff229bb9d7cca1982a72a1fa300166d1631', method: "GET", action: this.formActionUrl }, h("h3", { key: 'eabf93412d1df20d5cc99a74e30337378d43b37a', class: "pn-parcel-tracker__container__heading" }, this.heading), h("pn-marketweb-input", { key: 'e8dab573ff27b488160181f803fe97207e0ab330', name: this.inputName, placeholder: this.placeholder }), h("pn-button", { key: '43c41a32db482f094659fe055d22b143d8af0e17', type: "submit", icon: search, tooltip: this.currentWidth < 412 ? this.buttonLabel : null }, this.currentWidth >= 412 && this.buttonLabel)))));
    }
    static get is() { return "pn-parcel-tracker"; }
    static get originalStyleUrls() {
        return {
            "$": ["pn-parcel-tracker.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["pn-parcel-tracker.css"]
        };
    }
    static get properties() {
        return {
            "formActionUrl": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "form-action-url",
                "reflect": false,
                "defaultValue": "null"
            },
            "heading": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "heading",
                "reflect": false,
                "defaultValue": "'Track your parcel'"
            },
            "buttonLabel": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "button-label",
                "reflect": false,
                "defaultValue": "null"
            },
            "locale": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "locale",
                "reflect": false,
                "defaultValue": "'en'"
            },
            "placeholder": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "placeholder",
                "reflect": false,
                "defaultValue": "'Enter shipment ID'"
            },
            "inputName": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "attribute": "input-name",
                "reflect": false,
                "defaultValue": "'shipmentID'"
            }
        };
    }
    static get states() {
        return {
            "currentWidth": {}
        };
    }
    static get elementRef() { return "hostElement"; }
    static get listeners() {
        return [{
                "name": "resize",
                "method": "handleViewportSizeChange",
                "target": "window",
                "capture": false,
                "passive": true
            }];
    }
}
//# sourceMappingURL=pn-parcel-tracker.js.map
