import { UmbConditionBase } from '../../../../core/extension-registry/index.js';
import { UMB_TREE_ITEM_CONTEXT } from '../../../../core/tree/index.js';
export class UmbTemplateAllowDeleteActionCondition extends UmbConditionBase {
    constructor(host, args) {
        super(host, args);
        this.consumeContext(UMB_TREE_ITEM_CONTEXT, (context) => {
            this.observe(context?.hasChildren, (hasChildren) => {
                this.permitted = hasChildren === false;
            }, '_templateAllowDeleteActionCondition');
        });
    }
}
export { UmbTemplateAllowDeleteActionCondition as api };
