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 { UMB_EDIT_MEDIA_WORKSPACE_PATH_PATTERN } from '../../../../../paths.js';
import { css, customElement, html, nothing, property, state } from '../../../../../../../../external/lit/index.js';
import { UmbLitElement } from '../../../../../../../core/lit-element/index.js';
let UmbTrashedMediaNameTableColumnElement = class UmbTrashedMediaNameTableColumnElement extends UmbLitElement {
    constructor() {
        super(...arguments);
        this._name = '';
        this._editPath = '';
    }
    set value(value) {
        this.#value = value;
        if (value) {
            this._name = value.variants[0]?.name || '';
            this._editPath = UMB_EDIT_MEDIA_WORKSPACE_PATH_PATTERN.generateAbsolute({
                unique: value.unique,
            });
        }
    }
    get value() {
        return this.#value;
    }
    #value;
    render() {
        if (!this.value)
            return nothing;
        if (!this._name)
            return nothing;
        return html `<uui-button compact href=${this._editPath} label=${this._name}></uui-button>`;
    }
    static { this.styles = [
        css `
			uui-button {
				text-align: left;
			}
		`,
    ]; }
};
__decorate([
    state()
], UmbTrashedMediaNameTableColumnElement.prototype, "_name", void 0);
__decorate([
    state()
], UmbTrashedMediaNameTableColumnElement.prototype, "_editPath", void 0);
__decorate([
    property({ attribute: false })
], UmbTrashedMediaNameTableColumnElement.prototype, "value", null);
UmbTrashedMediaNameTableColumnElement = __decorate([
    customElement('umb-trashed-media-name-table-column')
], UmbTrashedMediaNameTableColumnElement);
export { UmbTrashedMediaNameTableColumnElement };
