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

// /api/notify/* — auth, then forward to officer-notify. The apps register their push tokens through here
// and nothing else uses it; producers inside the tailnet POST to the sidecar over loopback directly.
//
// No notification knowledge lives in the platform: not a device token, not an APNs key, not a payload.

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

export const notifyRouter = proxy.router;

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