'use client'; import { Button, ButtonGroup, Card, CardBody, Checkbox, Slider } from '@heroui/react'; import { useState } from 'react'; import { useControlContext } from '@/contexts/control-context'; import { Actions } from './consts'; export const UIControls = () => { const [isControlsOpen, setIsControlsOpen] = useState(true); const { rubiksCubeRef, showRotationIndicators, setShowRotationIndicators, setBackground, cubeRoughness, setCubeRoughness, cubeSpeed, setCubeSpeed, } = useControlContext(); const scramble = () => { const scrambleSteps = Array.from({ length: 20 }, () => Actions[Math.floor(Math.random() * Actions.length)]); rubiksCubeRef?.current?.rotate(scrambleSteps); }; const reset = () => { rubiksCubeRef?.current?.reset(); }; const solve = () => { alert('Working on it!'); }; const train = () => { alert('Working on it!'); }; return (