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 { classMap, css, customElement, html, nothing, property, when } from '../../../../external/lit/index.js';
import { UmbLitElement } from '../../../core/lit-element/index.js';
let UmbMediaSearchResultItemElement = class UmbMediaSearchResultItemElement extends UmbLitElement {
    render() {
        if (!this.item)
            return nothing;
        const classes = { trashed: this.item.isTrashed };
        return html `
			${when(this.item.mediaType.icon ?? this.item.icon, (icon) => html `<umb-icon name=${icon}></umb-icon>`, () => html `<uui-icon name="icon-picture"></uui-icon>`)}
			<span class=${classMap(classes)}>${this.item.name}</span>
			<div class="extra">
				${when(this.item.isTrashed, () => html `
						<uui-tag look="secondary">
							<umb-localize key="mediaPicker_trashed">Trashed</umb-localize>
						</uui-tag>
					`)}
			</div>
		`;
    }
    static { this.styles = [
        css `
			:host {
				border-radius: var(--uui-border-radius);
				outline-offset: -3px;
				padding: var(--uui-size-space-3) var(--uui-size-space-5);

				display: flex;
				gap: var(--uui-size-space-3);
				align-items: center;

				width: 100%;

				> span {
					flex: 1;

					&.trashed {
						text-decoration: line-through;
						opacity: 0.6;
					}
				}
			}
		`,
    ]; }
};
__decorate([
    property({ type: Object })
], UmbMediaSearchResultItemElement.prototype, "item", void 0);
UmbMediaSearchResultItemElement = __decorate([
    customElement('umb-media-search-result-item')
], UmbMediaSearchResultItemElement);
export { UmbMediaSearchResultItemElement };
export { UmbMediaSearchResultItemElement as element };
