"use client";

import { useTranslations } from "next-intl";

import { Button, Typography } from "@/components/ui";

import styles from "./ViewAll.module.scss";

export interface ViewAllProps {
  isAll: boolean;
  count: number;
  onClick?: () => void;
}

export default function ViewAll({ count, isAll, onClick }: ViewAllProps) {
  const t = useTranslations("Chat");

  return (
    <Button className={styles.viewAllButton} onClick={onClick}>
      <Typography size="sm" weight="medium" className={styles.text}>
        {isAll ? t("hide_all") : t("view_all", { count })}
      </Typography>
    </Button>
  );
}
