export function globalBinding(spec) {
    return {
        apply: (state, ctx) => spec.component.setProps(spec.select(state, ctx)),
        invalidate: () => spec.component.invalidate(),
    };
}
export function perTabBinding(spec) {
    return {
        apply: (state, ctx) => {
            if (spec.predicate && !spec.predicate(state, ctx))
                return;
            spec.resolve(ctx.tab)?.setProps(spec.select(state, ctx));
        },
    };
}
//# sourceMappingURL=component-binding.js.map