import TranslateClient from "@/components/ui/localization/TranslateClient";
import TranslateServer from "@/components/ui/localization/TranslateServer";
import { cn } from "@/lib/utils";
import React from "react";

interface ProductStatusChipInterface {
  mostSelling: boolean;
  count: number;
}

const ProductStatusChip: React.FC<ProductStatusChipInterface> = ({
  mostSelling,
  count,
}) => {
  return (
    <div
      className={cn("py-2 px-5 rounded-xl w-fit font-semibold min-h-[40px]", {
        "bg-green-100/40 text-green-500": mostSelling,
        "bg-red-100/40 text-red-500": count === 0,
      })}
    >
      <TranslateClient
        text={count === 0 ? "out_of_stock" : mostSelling ? "most_selling" : ""}
      />
    </div>
  );
};

export default ProductStatusChip;
