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 { css, customElement, html, property } from '../../../external/lit/index.js';
import { UmbLitElement } from '../../core/lit-element/index.js';
import { UmbChangeEvent } from '../../core/event/index.js';
/**
 * @element umb-property-editor-ui-dimensions
 */
let UmbPropertyEditorUIDimensionsElement = class UmbPropertyEditorUIDimensionsElement extends UmbLitElement {
    constructor() {
        super(...arguments);
        this.value = {};
    }
    #onChangeWidth(e) {
        this.value = { ...this.value, width: Number(e.target.value) };
        this.dispatchEvent(new UmbChangeEvent());
    }
    #onChangeHeight(e) {
        this.value = { ...this.value, height: Number(e.target.value) };
        this.dispatchEvent(new UmbChangeEvent());
    }
    render() {
        return html `
			<uui-input
				type="number"
				autocomplete="off"
				min="0"
				step="1"
				label=${this.localize.term('general_width')}
				placeholder=${this.localize.term('general_width')}
				@change=${this.#onChangeWidth}
				.value=${this.value?.width?.toString() ?? ''}>
			</uui-input>
			<span>&times;</span>
			<uui-input
				type="number"
				autocomplete="off"
				min="0"
				step="1"
				label=${this.localize.term('general_height')}
				placeholder=${this.localize.term('general_height')}
				@change=${this.#onChangeHeight}
				.value=${this.value?.height?.toString() ?? ''}>
			</uui-input>
			<umb-localize key="general_pixels">pixels</umb-localize>
		`;
    }
    static { this.styles = [
        css `
			:host {
				display: flex;
				align-items: center;
				gap: var(--uui-size-space-1);
			}
		`,
    ]; }
};
__decorate([
    property({ type: Object })
], UmbPropertyEditorUIDimensionsElement.prototype, "value", void 0);
UmbPropertyEditorUIDimensionsElement = __decorate([
    customElement('umb-property-editor-ui-dimensions')
], UmbPropertyEditorUIDimensionsElement);
export { UmbPropertyEditorUIDimensionsElement };
export { UmbPropertyEditorUIDimensionsElement as element };
