
import { Button } from "@/components/ui/button";
// import { getTenantId } from "@/lib/auth";
// import { db } from "@/lib/db";
import { ArrowLeft } from "lucide-react";
import Link from "next/link";
import { notFound, usePathname, useSearchParams } from "next/navigation";

import { ChangePlanButton } from "./button";
import { queryProductionList, queryStaffList } from "@/lib/http/staff";
import { PlanCard } from "./card";
import { useTranslation } from "react-i18next";


export default async function Page() {
  // const tenantId = getTenantId();
  // const workspace = await db.query.workspaces.findFirst({
  //   where: (table, { eq }) => eq(table.tenantId, tenantId),
  // });
  // if (!workspace) {
  //   return notFound();
  // }





  return (
    <div>
      <Link
        // href="/manage"
        href="javascript:history.back()"

        className="flex items-center gap-1 text-sm duration-200 text-content-subtle hover:text-foreground"
      >
        <ArrowLeft className="w-4 h-4" /> Manage
      </Link>

      <div className="flex flex-col gap-6 mt-6 md:flex-col lg:flex-row max-w-7xl m-auto">
        {(["free", "pro", "custom"] as const).map((tier) => (<PlanCard key={tier} newPlan={"free"} tier={tier} />))}
      </div>
    </div>
  );
}
