import { getAgentDir, getAgentDirs } from "../config.js";
import { canonicalizePath, resolvePath } from "../utils/paths.js";
export function getLoaderAgentDirs(agentDir) {
    return agentDir === getAgentDir() ? getAgentDirs() : [agentDir];
}
export function resolveResourcePath(cwd, path) {
    return resolvePath(path, cwd, { trim: true });
}
export function mergeResourcePaths(cwd, primary, additional) {
    const merged = [];
    const seen = new Set();
    for (const p of [...primary, ...additional]) {
        const resolved = resolveResourcePath(cwd, p);
        const canonicalPath = canonicalizePath(resolved);
        if (seen.has(canonicalPath))
            continue;
        seen.add(canonicalPath);
        merged.push(resolved);
    }
    return merged;
}
//# sourceMappingURL=resource-loader-paths.js.map