import classes from './styles.module.scss';
import TV from '@shared/assets/images/tv.png';
import Laptop from '@shared/assets/images/laptop.png';
import { HomeButton } from './components/home.button';
import { useNavigate } from 'react-router-dom';

const HomePage = () => {
  const navigation = useNavigate();

  const handleLaptopRedirect = () => {
    navigation('/laptop');
  };

  const handleTVRedirect = () => {
    navigation('/tv');
  };

  return (
    <div className={classes.home}>
      <h1 className={classes.title}>Выберите тип обученной модели</h1>
      <div className={classes.container}>
        <HomeButton imgSrc={Laptop} onClick={handleLaptopRedirect} />
        <HomeButton imgSrc={TV} onClick={handleTVRedirect} />
      </div>
    </div>
  );
};

export default HomePage;
