{"version":3,"file":"children.mjs","names":[],"sources":["../../../src/web-components/catalog/children.ts"],"sourcesContent":["import type { LitRenderable } from \"../types\";\n\nexport function renderChildList(\n  childList: unknown,\n  buildChild: (id: string, basePath?: string) => LitRenderable,\n): LitRenderable[] {\n  if (!Array.isArray(childList)) return [];\n  return childList\n    .map((item: unknown) => {\n      if (item && typeof item === \"object\" && \"id\" in item) {\n        const node = item as { id: string; basePath?: string };\n        return buildChild(node.id, node.basePath);\n      }\n      if (typeof item === \"string\") return buildChild(item);\n      return null;\n    })\n    .filter(Boolean) as LitRenderable[];\n}\n"],"mappings":";AAEA,SAAgB,gBACd,WACA,YACiB;AACjB,KAAI,CAAC,MAAM,QAAQ,UAAU,CAAE,QAAO,EAAE;AACxC,QAAO,UACJ,KAAK,SAAkB;AACtB,MAAI,QAAQ,OAAO,SAAS,YAAY,QAAQ,MAAM;GACpD,MAAM,OAAO;AACb,UAAO,WAAW,KAAK,IAAI,KAAK,SAAS;;AAE3C,MAAI,OAAO,SAAS,SAAU,QAAO,WAAW,KAAK;AACrD,SAAO;GACP,CACD,OAAO,QAAQ"}