import { useTranslation } from 'next-i18next' import { ClearIcon } from 'shared/components/icons.mjs' import get from 'lodash.get' const Triangle = ({ transform = 'translate(0,0)', fill = 'currentColor' }) => ( ) const Line = () => ( ) const FlipIconInner = ({ x = 0, y = 0, rotate = 0, ...style }) => ( ) const RotateIconInner = ({ flipX = false }) => ( ) const rectSize = 24 const Button = ({ onClickCb, transform, Icon, children }) => { const _onClick = (event) => { event.stopPropagation() onClickCb(event) } return ( {children} ) } export const ShowButtonsToggle = ({ gist, layoutSetType, updateGist }) => { const { t } = useTranslation('workbench') const path = ['_state', 'layout', layoutSetType, 'showButtons'] const showButtons = get(gist, path, true) const setShowButtons = () => updateGist(path, !showButtons) return ( ) } /** buttons for manipulating the part */ export const Buttons = ({ transform, flip, rotate, resetPart, rotate90 }) => { const { t } = useTranslation('workbench') return ( {rotate ? ( ) : ( )} ) }