import { useState } from 'react'
import { useTranslation } from 'next-i18next'
import { NoIcon as ErrorIcon } from 'shared/components/icons.mjs'
import { WebLink } from 'shared/components/web-link.mjs'
const knownVars = [
'sa',
'Path',
'Point',
'Snippet',
'paths',
'points',
'snippets',
'absoluteOptions',
'complete',
'measurements',
'options',
'paperless',
'sa',
'scale',
'context',
'getId',
'hide',
'log',
'macro',
'setHidden',
'store',
'unhide',
'units',
'utils',
'Bezier',
'part',
]
export const analyzeDraftLogLine = ({ type, line, t }) => {
if (type === 'error' && line.stack) return {children}
const ShowStackButton = ({
setDetails,
details,
t,
txt = 'click here to show the stack trace',
}) => (
)
const NotDestructured = ({ missing, err, setDetails, details, t }) => (
{missing}
was not desctructured as a draft method
parameter.
{missing}
is undefined in{' '}
{err.stack.split('\n')[0].split('/designs/').pop()}
{missing}
variable is undefined.
{stack[0]}
for details or