import { UMB_ENTITY_DETAIL_WORKSPACE_CONTEXT } from '../../entity-detail/index.js';
import { UmbConditionBase } from '../../../extension-registry/index.js';
export class UmbContentWorkspaceIsLoadedCondition extends UmbConditionBase {
    constructor(host, args) {
        super(host, args);
        this.consumeContext(UMB_ENTITY_DETAIL_WORKSPACE_CONTEXT, (context) => {
            this.observe(context?.loading.isOn, (isLoading) => {
                // permitted is true when NOT loading (loading complete)
                this.permitted = isLoading === false;
            }, 'isLoadedObserver');
        });
    }
}
export { UmbContentWorkspaceIsLoadedCondition as api };
