import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { s as search } from './search.js';
import { d as defineCustomElement$2 } from './pn-marketweb-input2.js';

const pnParcelTrackerCss = "pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}@media screen and (max-width: 767px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}}pn-spotlight .pn-spotlight__container:has(pn-parcel-tracker) [slot=mobile-heading]{color:#005d92}.pn-spotlight__container__wrapper__content [slot=content]:has(pn-parcel-tracker){padding-left:2rem}pn-parcel-tracker{width:100%}pn-parcel-tracker .pn-parcel-tracker__container form{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:1.6rem}pn-parcel-tracker .pn-parcel-tracker__container form .pn-parcel-tracker__container__heading{color:#005d92;font-weight:500;margin-bottom:0}@media screen and (max-width: 768px){pn-parcel-tracker .pn-parcel-tracker__container form .pn-parcel-tracker__container__heading{display:none}}@media screen and (min-width: 1640px){pn-parcel-tracker .pn-parcel-tracker__container form .pn-parcel-tracker__container__heading{font-size:2.4rem;font-weight:700}}pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{flex-grow:1;max-width:80%}@media screen and (min-width: 768px){pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{max-width:50%}}@media screen and (min-width: 992px){pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{max-width:45%}}@media screen and (min-width: 1640px){pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{max-width:35%}}pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input input{border-radius:6.4rem}";
const PnParcelTrackerStyle0 = pnParcelTrackerCss;

const PnSpotlight = /*@__PURE__*/ proxyCustomElement(class PnSpotlight extends HTMLElement {
    constructor() {
        super();
        this.__registerHost();
        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;
    }
    get hostElement() { return this; }
    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 style() { return PnParcelTrackerStyle0; }
}, [0, "pn-parcel-tracker", {
        "formActionUrl": [1, "form-action-url"],
        "heading": [1],
        "buttonLabel": [1, "button-label"],
        "locale": [1],
        "placeholder": [1],
        "inputName": [1, "input-name"],
        "currentWidth": [32]
    }, [[9, "resize", "handleViewportSizeChange"]]]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["pn-parcel-tracker", "pn-marketweb-input"];
    components.forEach(tagName => { switch (tagName) {
        case "pn-parcel-tracker":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, PnSpotlight);
            }
            break;
        case "pn-marketweb-input":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
    } });
}

const PnParcelTracker = PnSpotlight;
const defineCustomElement = defineCustomElement$1;

export { PnParcelTracker, defineCustomElement };

//# sourceMappingURL=pn-parcel-tracker.js.map