import env from "../utils/env";

const apiHost = env.VITE_APP_NETWORK_RESURRECTOR_API_URL;

const networkRoute = `${apiHost}/network`;
const systemRoute = `${apiHost}/system`;
const resurrectorRoute = `${apiHost}/resurrector`;
const securityRoute = `${apiHost}/security`;

const endpoints = {
  network: {
    machines: `${networkRoute}/machines`,
    machine: {
      wake: `${resurrectorRoute}/wake`,
      ping: `${resurrectorRoute}/ping`,
      shutdown: `${resurrectorRoute}/shutdown`,
      restart: `${resurrectorRoute}/restart`
    }
  },
  system: {
    version: `${systemRoute}/version`,
    releaseNotes: `${systemRoute}/release-notes`,
    resetCache: `${systemRoute}/reset-cache`
  },
  security: {
    permissions: `${securityRoute}/permissions`
  }
};

export { endpoints };
