import React from "react";
import CardNormal from "src/components/Cards/CardNormal";
import Navbar from "src/components/NavBar";
import Content from "./components/Content";
import Filters from "./components/Filters";
import Footer from "../Landing/components/Footer";
import graphql from "src/utils/graphql";
import { getLocale } from "next-intl/server";

// query Products($locale:I18NLocaleCode,$page:Int,$pageSize:Int,$title:String,$categoryTitle:String,$brandTitle:String) {
//   products(
//       pagination: { page: $page, pageSize: $pageSize }
//       filters: {
//           category: { title: { contains: $categoryTitle } }
//           brand: { title: { eq: $brandTitle } }
//           title: { eq: $title }
//       }
//       locale: $locale
//   ) {
//       title
//       documentId
//       price
//       brand {
//           title
//           documentId
//           slug
//       }
//       category {
//           documentId
//           title
//           slug
//       }
//   }
// }



const CategoriesData = async ({ category }) => {

  const locale = await getLocale()

  return (
    <>

      <div className={`container-none md:container mx-auto p-4  flex flex-col md:flex-row mt-10 ${locale === "en"  ? "ltr" : "rtl"}`}>

        <Content category={category} />
      </div>

    </>
  );
};

export default CategoriesData;
