{"version":3,"file":"JSONObjectNode.cjs","sources":["../../../../../.yarn/__virtual__/react-json-tree-virtual-6a28170cd8/4/.yarn/berry/cache/react-json-tree-npm-0.19.0-c65c86bc20-10c0.zip/node_modules/react-json-tree/lib/JSONObjectNode.js"],"sourcesContent":["import React from 'react';\nimport JSONNestedNode from './JSONNestedNode.js';\n// Returns the \"n Items\" string for this node,\n// generating and caching it if it hasn't been created yet.\nfunction createItemString(data) {\n    const len = Object.getOwnPropertyNames(data).length;\n    return `${len} ${len !== 1 ? 'keys' : 'key'}`;\n}\n// Configures <JSONNestedNode> to render an Object\nexport default function JSONObjectNode({ data, ...props }) {\n    return (React.createElement(JSONNestedNode, { ...props, data: data, nodeType: \"Object\", nodeTypeIndicator: props.nodeType === 'Error' ? 'Error()' : '{}', createItemString: createItemString, expandable: Object.getOwnPropertyNames(data).length > 0 }));\n}\n"],"names":["React"],"mappings":";;;;;AAIA,SAAS,iBAAiB,MAAM;AAC5B,QAAM,MAAM,OAAO,oBAAoB,IAAI,EAAE;AAC7C,SAAO,GAAG,GAAG,IAAI,QAAQ,IAAI,SAAS,KAAK;AAC/C;AAEe,SAAS,eAAe,EAAE,MAAM,GAAG,SAAS;AACvD,SAAQA,uBAAM,cAAc,gBAAgB,EAAE,GAAG,OAAO,MAAY,UAAU,UAAU,mBAAmB,MAAM,aAAa,UAAU,YAAY,MAAM,kBAAoC,YAAY,OAAO,oBAAoB,IAAI,EAAE,SAAS,EAAC,CAAE;AAC3P;;","x_google_ignoreList":[0]}