import { buildNativeReqOutboundCompatAdapterContext } from "../../hub/pipeline/compat/native-adapter-context.js";
import { applyUniversalShapeRequestFilterWithNative, applyUniversalShapeResponseFilterWithNative, } from "../../../router/virtual-router/engine-selection/native-compat-action-semantics.js";
export class UniversalShapeFilter {
    cfg;
    constructor(config) {
        this.cfg = config;
    }
    applyRequestFilter(payload) {
        return applyUniversalShapeRequestFilterWithNative(payload, this.cfg);
    }
    applyResponseFilter(payload, ctx) {
        return applyUniversalShapeResponseFilterWithNative(payload, this.cfg, buildNativeReqOutboundCompatAdapterContext(ctx));
    }
}
