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';
import { UmbTextStyles } from '../../../../core/style/index.js';
import { UmbId } from '../../../../core/id/index.js';
import { UmbChangeEvent } from '../../../../core/event/index.js';
let UmbPropertyEditorUIBlockGridGroupConfigurationElement = class UmbPropertyEditorUIBlockGridGroupConfigurationElement extends UmbLitElement {
    constructor() {
        super(...arguments);
        this._value = [];
    }
    set value(value) {
        this._value = value || [];
    }
    get value() {
        return this._value;
    }
    set config(config) { }
    #addGroup() {
        this.value = [...this._value, { name: 'Unnamed group', key: UmbId.new() }];
        this.dispatchEvent(new UmbChangeEvent());
    }
    render() {
        return html `
			<uui-button label=${this.localize.term('blockEditor_addBlockGroup')} look="placeholder" @click=${this.#addGroup}>
				${this.localize.term('blockEditor_addBlockGroup')}
			</uui-button>
		`;
    }
    static { this.styles = [
        UmbTextStyles,
        css `
			uui-button {
				display: block;
			}
		`,
    ]; }
};
__decorate([
    property({ type: Array })
], UmbPropertyEditorUIBlockGridGroupConfigurationElement.prototype, "value", null);
UmbPropertyEditorUIBlockGridGroupConfigurationElement = __decorate([
    customElement('umb-property-editor-ui-block-grid-group-configuration')
], UmbPropertyEditorUIBlockGridGroupConfigurationElement);
export { UmbPropertyEditorUIBlockGridGroupConfigurationElement };
export default UmbPropertyEditorUIBlockGridGroupConfigurationElement;
