import React, { Children, useEffect } from "react";
import { useStore } from "../stores/global-stores";

export default function Suggestions({
  children,
  preview,
}: {
  children: React.ReactNode;
  preview?: () => React.ReactNode;
}) {
  const [suggestionPreview] = useStore((states) => [states.suggestionPreview]);
  return (
    <div
      className="oms-scrollbar"
      style={{
        display: "flex",
        flexWrap: "nowrap",
      }}
    >
      <div
        style={{
          height: "300px",  
          overflowY: "auto",
          flex: 1,
        }}
      >
        {children}
      </div>
      {suggestionPreview}
    </div>
  );
}
