/* eslint-disable global-require */ import React, { ReactElement, useEffect, useRef } from 'react'; import styles from './Pen.module.css'; export default function Pen(): ReactElement { const drawnPathRef = useRef(null); const penTopRef = useRef(null); const penRingRef = useRef(null); const penHandleRef = useRef(null); const dotRef = useRef(null); useEffect(() => { // eslint-disable-next-line @typescript-eslint/no-var-requires const animate = require('animateplus'); animate({ el: drawnPathRef.current, 'stroke-dashoffset': [570, 1140], duration: 800, easing: 'easeOutSine', delay: 600, }); animate({ el: penTopRef.current, 'stroke-dashoffset': [85, 0], duration: 900, easing: 'linear', delay: 1100, }); animate({ el: penRingRef.current, 'stroke-dashoffset': [48, 0], duration: 900, easing: 'linear', delay: 1100, }); animate({ el: penHandleRef.current, 'stroke-dashoffset': [228, 456], duration: 900, easing: 'linear', delay: 1100, }); animate({ el: dotRef.current, rx: [0, 3.6743313], ry: [0, 1.73943662], duration: 600, easing: 'easeOutQuad', delay: 1500, }); }, []); return ( ); }