import QueryError from "../../errors/QueryError.js";
import { finalizeSide, } from "./ComparisonSelector.js";
export default class HostBackedComparisonSideFinalizer {
    host;
    constructor(host) {
        if (host === null || host === undefined) {
            throw new QueryError('comparison side finalizer requires a host', {
                code: 'invalid_coordinate',
            });
        }
        this.host = host;
        Object.freeze(this);
    }
    async finalize(read, scope) {
        return await finalizeSide(this.host, read, scope);
    }
}
