/**
 * tRPC Initialization
 *
 * Extracted from router.ts to break circular dependencies.
 * All domain routers import from here instead of router.ts.
 */

import { initTRPC } from '@trpc/server';
import type { TRPCContext } from './context.js';

const t = initTRPC.context<TRPCContext>().create();

export const router = t.router;
export const publicProcedure = t.procedure;
export const middleware = t.middleware;
export const createCallerFactory = t.createCallerFactory;

export type ProcedureBuilder = typeof t.procedure;
