var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { html, customElement, property, css } from '../../../../../../external/lit/index.js';
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
let UmbInputUploadFieldSvgElement = class UmbInputUploadFieldSvgElement extends UmbLitElement {
    constructor() {
        super(...arguments);
        this.path = '';
    }
    render() {
        if (!this.path)
            return html `<uui-loader></uui-loader>`;
        const label = this.path.split('/').pop() ?? '';
        return html `<img src=${this.path} alt=${label} loading="lazy" />`;
    }
    static { this.styles = [
        css `
			:host {
				width: fit-content;
				min-width: 320px;
				max-width: 100%;
			}

			img {
				display: block;
				object-fit: contain;
				width: auto;
				height: auto;
				min-height: 20px;
				max-height: 400px;
				max-width: 100%;
				background-color: #fff;
				background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill-opacity=".1"><path d="M50 0h50v50H50zM0 50h50v50H0z"/></svg>');
				background-repeat: repeat;
				background-size: 10px 10px;
			}
		`,
    ]; }
};
__decorate([
    property({ type: String })
], UmbInputUploadFieldSvgElement.prototype, "path", void 0);
UmbInputUploadFieldSvgElement = __decorate([
    customElement('umb-input-upload-field-svg')
], UmbInputUploadFieldSvgElement);
export default UmbInputUploadFieldSvgElement;
