import React, { memo } from 'react';
import logo from 'editorAssets/hiHouse/图文导航-120x120.png';
import withLogo from 'editorUtils/withLogo';
import { GraphicNavigation as Component } from 'lwj-mobile-ui';
import 'lwj-mobile-ui/dist/styles/components/GraphicNavigation.scss';
import { useAutosize } from '../hooks/useAutosize';

interface IGraphicNavigationProps {}

const GraphicNavigation: React.FC<React.ComponentProps<typeof Component>> = memo((props) => {
  const { containerRef } = useAutosize([props.imgList?.length, props.iconSize]);
  return (
    <div ref={containerRef}>
      <Component {...props} />
    </div>
  );
});

export default withLogo(GraphicNavigation, logo);
