import { RSC_PREFETCH_SUFFIX } from "../../../../lib/constants";
import { SuffixPathnameNormalizer } from "./suffix";
export class PrefetchRSCPathnameNormalizer {
    constructor(hasAppDir){
        this.hasAppDir = hasAppDir;
        this.suffix = new SuffixPathnameNormalizer(RSC_PREFETCH_SUFFIX);
    }
    match(pathname) {
        // If there's no app directory, we don't match.
        if (!this.hasAppDir) return false;
        return this.suffix.match(pathname);
    }
    normalize(pathname, matched) {
        // If there's no app directory, we don't need to normalize.
        if (!this.hasAppDir) return pathname;
        return this.suffix.normalize(pathname, matched);
    }
}

//# sourceMappingURL=prefetch-rsc.js.map