/**
 * Copyright (c) 2023-present Pi Dash Software, Inc. and contributors
 * SPDX-License-Identifier: AGPL-3.0-only
 * See the LICENSE file for details.
 */

import { observer } from "mobx-react";
import packageJson from "package.json";
import { useTranslation } from "@pi-dash/i18n";
// helpers
import { cn } from "@pi-dash/utils";

export const ProductUpdatesHeader = observer(function ProductUpdatesHeader() {
  const { t } = useTranslation();
  return (
    <div className="mx-6 my-4 flex flex-shrink-0 items-center justify-between gap-2">
      <div className="flex w-full items-center">
        <div className="flex gap-2 text-18 font-medium">{t("What's new?")}</div>
        <div
          className={cn(
            "mx-2 rounded-full bg-accent-primary/20 px-2 py-0.5 text-center text-11 font-medium text-accent-primary"
          )}
        >
          {t("Version")}: v{packageJson.version}
        </div>
      </div>
    </div>
  );
});
