{"version":3,"file":"RenderVersionFieldsToDiff.js","names":["c","_c","baseClass","ShimmerEffect","React","Fragment","useEffect","RenderVersionFieldsToDiff","t0","$","parent","t1","versionFields","undefined","hasMounted","setHasMounted","useState","t2","t3","Symbol","for","t4","t5","_jsx","className","children","height","width","map","_temp","field","fieldIndex","fieldByLocale","LocaleComponents","locale","baseField","Object","entries","push","path","CustomComponent","join","type"],"sources":["../../../../src/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.tsx"],"sourcesContent":["'use client'\nconst baseClass = 'render-field-diffs'\nimport type { VersionField } from 'payload'\n\nimport './index.scss'\n\nimport { ShimmerEffect } from '@payloadcms/ui'\nimport React, { Fragment, useEffect } from 'react'\n\nexport const RenderVersionFieldsToDiff = ({\n parent = false,\n versionFields,\n}: {\n /**\n * If true, this is the parent render version fields component, not one nested in\n * a field with children (e.g. group)\n */\n parent?: boolean\n versionFields: VersionField[]\n}): React.ReactNode => {\n const [hasMounted, setHasMounted] = React.useState(false)\n\n // defer rendering until after the first mount as the CSS is loaded with Emotion\n // this will ensure that the CSS is loaded before rendering the diffs and prevent CLS\n useEffect(() => {\n setHasMounted(true)\n }, [])\n\n return (\n