import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';

const pdsImageCss = ":host{--dimension-aspect-ratio:auto;display:inline-block}img{aspect-ratio:var(--dimension-aspect-ratio);display:block;height:auto;max-width:100%}";

const PdsImage$1 = /*@__PURE__*/ proxyCustomElement(class PdsImage extends HTMLElement {
    constructor(registerHost) {
        super();
        if (registerHost !== false) {
            this.__registerHost();
        }
        this.__attachShadow();
        /**
         * The image's alt tag. If none is provided,
         * it will default to an empty string, which is desired for
         * decorative images.
         * @defaultValue ''
         */
        this.alt = '';
        /**
         * Indicates how the browser should load the image.
         * @defaultValue eager
         */
        this.loading = 'eager';
    }
    render() {
        return (h(Host, { key: 'fa205f03d5c378d27a66cbfd520ae2bc7ab9e9df', class: {
                'pds-image': true,
            }, id: this.componentId }, h("img", { key: '8d03dddf6e924ef8aebea2bf34a32e326bee329a', alt: this.alt, height: this.height, loading: this.loading, sizes: this.sizes, src: this.src, srcset: this.srcset, width: this.width })));
    }
    static get style() { return pdsImageCss; }
}, [257, "pds-image", {
        "alt": [1],
        "componentId": [1, "component-id"],
        "height": [2],
        "loading": [1],
        "sizes": [1],
        "src": [1],
        "srcset": [1],
        "width": [2]
    }]);
function defineCustomElement$1() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["pds-image"];
    components.forEach(tagName => { switch (tagName) {
        case "pds-image":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, PdsImage$1);
            }
            break;
    } });
}

const PdsImage = PdsImage$1;
const defineCustomElement = defineCustomElement$1;

export { PdsImage, defineCustomElement };
//# sourceMappingURL=pds-image.js.map

//# sourceMappingURL=pds-image.js.map