import { useState } from 'react'
import SvgWrapper from './svg-wrapper'
import Error from './error.js'
import Popout from 'shared/components/popout.js'
import Robot from 'shared/components/robot/index.js'
const LabDraft = props => {
const { app, draft, pattern, gist, updateGist, unsetGist, feedback } = props
const [share, setShare] = useState(false)
if (!draft) return null
if (gist?.renderer === 'svg') {
// Render as SVG
let svg
try { svg = draft.render() }
catch(error) {
console.log('Failed to render pattern', error)
return
Don't be alarmed, but we ran into some trouble while drafting this pattern.
If you like puzzles, you can try to figure out what went wrong:
Alternatively, you can escalate this. Which means that: