
export type AppRoute = "/login" | "/" | "/register" | "/dashboard" | "/dashboard/chatterbox-tts" | "/dashboard/chatterbox-tts/chatterbox-tts" | "/dashboard/apikey/apikey" | "/dashboard/dashboard" | "/dashboard/tiktok-tts" | "/dashboard/tiktok-tts/tiktok-tts";

export function route(path: AppRoute, params?: Record<string,string|number>) {
  if (!params) return path;
  let final = path;
  for (const k of Object.keys(params)) {
    final = final.replace(":" + k, params[k] + "") as AppRoute;
  }
  return final;
}
