// eslint-disable-next-line no-unused-vars
import React from 'react'
import sanitize from 'html-react-parser'
const style = { fill: 'none', stroke: 'currentColor' }
const StackDefs = ({ stacks }) =>
Object.keys(stacks).map((stackName) => {
const part = stacks[stackName].parts[0]
let anchor = { x: 0, y: 0 }
if (typeof part.points.gridAnchor !== 'undefined') anchor = part.points.gridAnchor
else if (typeof part.points.anchor !== 'undefined') anchor = part.points.anchor
if (isNaN(anchor.x)) anchor.x = 0
if (isNaN(anchor.y)) anchor.y = 0
return (
)
})
const MetricPaperlessDefs = ({ stacks }) => (
<>
>
)
const ImperialPaperlessDefs = ({ stacks }) => (
<>
>
)
const PaperlessDefs = ({ units = 'metric', stacks }) =>
units === 'imperial' ? (
) : (
)
export const Defs = (props) =>
props.svg ? (
{props.svg.defs.list ? sanitize(Object.values(props.svg.defs.list).join('')) : null}
{props.settings[0].paperless ? (
) : null}
) : null