import { UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT } from '../content-collection-workspace.context-token.js';
import { UmbConditionBase } from '../../../../core/extension-registry/index.js';
const ObserveSymbol = Symbol();
export class UmbWorkspaceHasContentCollectionCondition extends UmbConditionBase {
    constructor(host, args) {
        super(host, args);
        this.consumeContext(UMB_CONTENT_COLLECTION_WORKSPACE_CONTEXT, (context) => {
            this.observe(context?.collection.hasCollection, (hasCollection) => {
                this.permitted = hasCollection ?? false;
            }, ObserveSymbol);
        });
    }
}
export { UmbWorkspaceHasContentCollectionCondition as api };
