import * as Path from "./path/index.js";
/**
 * App identifier.
 */
export function appId(app) {
    return `${app.creator}/${app.name}`;
}
/**
 * Lists the filesystems paths for a set of `Permissions`.
 * This'll return a list of `DistinctivePath`s.
 */
export function permissionPaths(permissions) {
    let list = [];
    if (permissions.app)
        list.push(Path.appData(permissions.app));
    if (permissions.fs?.private)
        list = list.concat(permissions.fs?.private.map(p => Path.combine(Path.directory(Path.Branch.Private), p)));
    if (permissions.fs?.public)
        list = list.concat(permissions.fs?.public.map(p => Path.combine(Path.directory(Path.Branch.Public), p)));
    return list;
}
//# sourceMappingURL=permissions.js.map