// Dependencies import { nsMerge, capitalize, optionsMenuStructure, optionType, cloudflareImageUrl, } from 'shared/utils.mjs' import { designs } from 'shared/config/designs.mjs' import { examples } from 'site/components/design-examples.mjs' // Hooks import { useTranslation } from 'next-i18next' import { useDesign } from 'site/hooks/use-design.mjs' import { useContext, Fragment } from 'react' // Context import { ModalContext } from 'shared/context/modal-context.mjs' // Components import { ModalWrapper } from 'shared/components/wrappers/modal.mjs' import { lineDrawings } from 'shared/components/designs/linedrawings/index.mjs' import { ns as designNs } from 'shared/components/designs/design.mjs' import { Difficulty } from 'shared/components/designs/difficulty.mjs' import { PageLink, AnchorLink, Link } from 'shared/components/link.mjs' import { DocsLink, DocsTitle } from 'shared/components/mdx/docs-helpers.mjs' import { DynamicOrgDocs as DynamicDocs } from 'site/components/dynamic-org-docs.mjs' import { Popout } from 'shared/components/popout/index.mjs' import { NewPatternIcon } from 'shared/components/icons.mjs' // Translation namespaces used on this page export const ns = nsMerge( designNs, 'account', 'tags', 'techniques', 'measurements', 'workbench', 'designs', 'tags' ) const Option = ({ id, option, t, design }) => optionType(option) === 'constant' ? null : (
  • ) const OptionGroup = ({ id, group, t, design }) => (
  • {t(`workbench:${id}`)}
  • ) const SimpleOptionsList = ({ options, t, design }) => { const structure = optionsMenuStructure(options, {}) const output = [] for (const [key, entry] of Object.entries(structure)) { const shared = { key, t, design, id: key } if (entry.isGroup) output.push() else output.push(