{"ast":null,"code":"import React, { useMemo } from 'react';\nimport { getAttributes, isStructTreeNode, isStructTreeNodeWithOnlyContentChild } from './shared/structTreeUtils.js';\nexport default function StructTreeItem({\n  className,\n  node\n}) {\n  const attributes = useMemo(() => getAttributes(node), [node]);\n  const children = useMemo(() => {\n    if (!isStructTreeNode(node)) {\n      return null;\n    }\n    if (isStructTreeNodeWithOnlyContentChild(node)) {\n      return null;\n    }\n    return node.children.map((child, index) => {\n      return (\n        // eslint-disable-next-line react/no-array-index-key\n        React.createElement(StructTreeItem, {\n          key: index,\n          node: child\n        })\n      );\n    });\n  }, [node]);\n  return React.createElement(\"span\", Object.assign({\n    className: className\n  }, attributes), children);\n}","map":{"version":3,"names":["React","useMemo","getAttributes","isStructTreeNode","isStructTreeNodeWithOnlyContentChild","StructTreeItem","className","node","attributes","children","map","child","index","createElement","key","Object","assign"],"sources":["/Users/chrishaack/UC_Trains_Voice/react-demo/node_modules/react-pdf/dist/esm/StructTreeItem.js"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { getAttributes, isStructTreeNode, isStructTreeNodeWithOnlyContentChild, } from './shared/structTreeUtils.js';\nexport default function StructTreeItem({ className, node }) {\n    const attributes = useMemo(() => getAttributes(node), [node]);\n    const children = useMemo(() => {\n        if (!isStructTreeNode(node)) {\n            return null;\n        }\n        if (isStructTreeNodeWithOnlyContentChild(node)) {\n            return null;\n        }\n        return node.children.map((child, index) => {\n            return (\n            // eslint-disable-next-line react/no-array-index-key\n            React.createElement(StructTreeItem, { key: index, node: child }));\n        });\n    }, [node]);\n    return (React.createElement(\"span\", Object.assign({ className: className }, attributes), children));\n}\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,aAAa,EAAEC,gBAAgB,EAAEC,oCAAoC,QAAS,6BAA6B;AACpH,eAAe,SAASC,cAAcA,CAAC;EAAEC,SAAS;EAAEC;AAAK,CAAC,EAAE;EACxD,MAAMC,UAAU,GAAGP,OAAO,CAAC,MAAMC,aAAa,CAACK,IAAI,CAAC,EAAE,CAACA,IAAI,CAAC,CAAC;EAC7D,MAAME,QAAQ,GAAGR,OAAO,CAAC,MAAM;IAC3B,IAAI,CAACE,gBAAgB,CAACI,IAAI,CAAC,EAAE;MACzB,OAAO,IAAI;IACf;IACA,IAAIH,oCAAoC,CAACG,IAAI,CAAC,EAAE;MAC5C,OAAO,IAAI;IACf;IACA,OAAOA,IAAI,CAACE,QAAQ,CAACC,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAK;MACvC;QACA;QACAZ,KAAK,CAACa,aAAa,CAACR,cAAc,EAAE;UAAES,GAAG,EAAEF,KAAK;UAAEL,IAAI,EAAEI;QAAM,CAAC;MAAC;IACpE,CAAC,CAAC;EACN,CAAC,EAAE,CAACJ,IAAI,CAAC,CAAC;EACV,OAAQP,KAAK,CAACa,aAAa,CAAC,MAAM,EAAEE,MAAM,CAACC,MAAM,CAAC;IAAEV,SAAS,EAAEA;EAAU,CAAC,EAAEE,UAAU,CAAC,EAAEC,QAAQ,CAAC;AACtG"},"metadata":{},"sourceType":"module","externalDependencies":[]}