import path from "path";
import { AppNames } from "./app-names";

type Params = {
    name?: string;
};

export default function turboCIPkgrabDirNames(params?: Params) {
    const relayTurboCIDir = "/root/.turboci";
    const relayConfigDir = path.join(relayTurboCIDir, ".config");
    const relayConfigJSON = path.join(relayConfigDir, "turboci.json");
    const relayServerSSHDir = path.join(relayTurboCIDir, ".ssh");
    const relayServerBunScriptsDir = path.join(relayTurboCIDir, ".bun");
    const relayServerBunScriptFile = path.join(
        relayServerBunScriptsDir,
        "run.ts",
    );
    const relayServerSshPublicKeyFile = path.join(
        relayServerSSHDir,
        `${AppNames["TurboCISSHKeyName"]}.pub`,
    );
    const relayServerSshPrivateKeyFile = path.join(
        relayServerSSHDir,
        AppNames["TurboCISSHKeyName"],
    );

    const relayServerRsyncDir = "/root/.turboci/.rsync";
    const relayShDir = "/root/.turboci/.sh";
    const relayShExecFile = path.join(relayShDir, "relay.sh");

    return {
        relayServerSSHDir,
        relayServerSshPublicKeyFile,
        relayServerSshPrivateKeyFile,
        relayServerRsyncDir,
        relayServerBunScriptsDir,
        relayServerBunScriptFile,
        relayShDir,
        relayShExecFile,
        relayConfigDir,
        relayConfigJSON,
    };
}
