// about Section horizontal Scrolling Section Goes Here
// about Section With B/W Horizontal Scroll Function
const aboutHorizontalScrolling = document.getElementById("aboutScroll");
const aboutPinWrap = document.getElementById("aboutPinWrap");
const aboutAnimWrap = document.getElementById("aboutAnimWrap");
const getToValue_about = () => -(aboutAnimWrap.scrollWidth - window.innerWidth);

ScrollTrigger.create({
  trigger: aboutHorizontalScrolling,
  start: "top top",
  end: () => "+=" + aboutAnimWrap.scrollWidth,
  pin: aboutPinWrap,
  invalidateOnRefresh: true,
  scrub: true,
  // scroller: ".smooth-scroll",
});

const fakeHorizontalAnim3 = gsap.fromTo(
  aboutAnimWrap,
  {
    x: () =>
      aboutAnimWrap.classList.contains("to-right") ? 0 : getToValue_about(),
  },
  {
    x: () =>
      aboutAnimWrap.classList.contains("to-right") ? getToValue_about() : 0,
    ease: "none",
    scrollTrigger: {
      trigger: aboutHorizontalScrolling,
      start: "top top",
      end: () => "+=" + aboutAnimWrap.scrollWidth,
      // end: () => "+=" + (thisAnimWrap.scrollWidth - window.innerWidth),
      invalidateOnRefresh: true,
      scrub: true,
      // scroller: ".smooth-scroll",
    },
  }
);
