import { createSidecarProxy } from '../../sidecar/create-proxy';

// /api/gitea/* — auth, then forward to officer-gitea. No routes of its own and no Gitea knowledge:
// this file must never grow app logic.
//
// The sidecar owns the Gitea contract and holds the personal access token. The platform knows neither.

const proxy = createSidecarProxy({
  name: 'gitea',
  prefix: '/api/gitea',
});

export const giteaRouter = proxy.router;

/** Base URL of the sidecar's HTTP server, or null if it hasn't reported in yet. */
export const getGiteaServerUrl = proxy.getHttpUrl;
