"use strict";
const z = require("zod");
const index = require("./user-v6mfWQ2d.cjs");
const variantSchema = z.nativeEnum(index.AppCategories);
function getInstalledAppPath({ variant, slug }, locationSearch = "") {
  if (!variant)
    return `/apps/installed${locationSearch}`;
  const parsedVariant = variantSchema.safeParse(variant);
  if (!parsedVariant.success)
    return `/apps/installed${locationSearch}`;
  if (!slug)
    return `/apps/installed/${variant}${locationSearch}`;
  return `/apps/installed/${variant}?hl=${slug}${locationSearch && locationSearch.slice(1)}`;
}
exports.getInstalledAppPath = getInstalledAppPath;
