import React from 'react';
import { useStoreDispatch } from '../../App';
import ArBox from '../../assets/ArBox';
import { SetModal } from '../../store/actions/Settings';
import { modalName } from '../../store/reducers/Settings';
import s from './ArBtn.module.scss';

export const ArBtn = () => {
  const dispatch = useStoreDispatch();
  const openTutorial = (name: modalName) => {
    dispatch(SetModal({ list: { [name]: true } }));
  };

  return (
    <div className={s.ar__block}>
      <div className={s.ar_open} onClick={() => openTutorial('arStep1')}>
        <span>View in Your DRIVEWAY</span>
        <ArBox />
      </div>
    </div>
  );
};
