{"version":3,"file":"ChildList.cjs","names":["React"],"sources":["../../../../../../src/react-renderer/a2ui-react/catalog/minimal/components/ChildList.tsx"],"sourcesContent":["/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\nexport const ChildList: React.FC<{\n  childList: unknown;\n  buildChild: (id: string, basePath?: string) => React.ReactNode;\n}> = ({ childList, buildChild }) => {\n  if (Array.isArray(childList)) {\n    return (\n      <>\n        {childList.map((item: unknown, i: number) => {\n          // The new binder outputs objects like { id: string, basePath: string } for arrays of structural nodes\n          if (item && typeof item === \"object\" && \"id\" in item) {\n            const node = item as { id: string; basePath?: string };\n            return (\n              <React.Fragment key={`${node.id}-${i}`}>\n                {buildChild(node.id, node.basePath)}\n              </React.Fragment>\n            );\n          }\n          // Fallback for static string lists\n          if (typeof item === \"string\") {\n            return (\n              <React.Fragment key={`${item}-${i}`}>\n                {buildChild(item)}\n              </React.Fragment>\n            );\n          }\n          return null;\n        })}\n      </>\n    );\n  }\n\n  return null;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkBA,MAAa,aAGP,EAAE,WAAW,iBAAiB;AAClC,KAAI,MAAM,QAAQ,UAAU,CAC1B,QACE,mFACG,UAAU,KAAK,MAAe,MAAc;AAE3C,MAAI,QAAQ,OAAO,SAAS,YAAY,QAAQ,MAAM;GACpD,MAAM,OAAO;AACb,UACE,2CAACA,cAAM,sBACJ,WAAW,KAAK,IAAI,KAAK,SAAS,IADhB,GAAG,KAAK,GAAG,GAAG,IAElB;;AAIrB,MAAI,OAAO,SAAS,SAClB,QACE,2CAACA,cAAM,sBACJ,WAAW,KAAK,IADE,GAAG,KAAK,GAAG,IAEf;AAGrB,SAAO;GACP,GACD;AAIP,QAAO"}