import { UMB_HAS_CHILDREN_ENTITY_CONTEXT } from '../context/has-children.context-token.js';
import { UmbConditionBase } from '../../../extension-registry/index.js';
export class UmbEntityHasChildrenCondition extends UmbConditionBase {
    constructor(host, args) {
        super(host, args);
        this.consumeContext(UMB_HAS_CHILDREN_ENTITY_CONTEXT, (context) => {
            this.observe(context?.hasChildren, (hasChildren) => {
                this.permitted = hasChildren === true;
            });
        });
    }
}
export { UmbEntityHasChildrenCondition as api };
