"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "PrefetchRSCPathnameNormalizer", {
    enumerable: true,
    get: function() {
        return PrefetchRSCPathnameNormalizer;
    }
});
const _constants = require("../../../../lib/constants");
const _suffix = require("./suffix");
class PrefetchRSCPathnameNormalizer {
    constructor(hasAppDir){
        this.hasAppDir = hasAppDir;
        this.suffix = new _suffix.SuffixPathnameNormalizer(_constants.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