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

import type { ComponentProps } from "react";
import { useTranslation } from "@plane/i18n";
import { Button } from "@plane/propel/button";
import { cn } from "@plane/utils";

type TPrimaryActionButtonProps = ComponentProps<typeof Button>;

export const AppHeaderPrimaryActionButton = (props: TPrimaryActionButtonProps) => {
  const { children, className, ...buttonProps } = props;
  const { t } = useTranslation();

  return (
    <Button
      variant="primary"
      size="lg"
      className={cn("nodedc-toolbar-primary nodedc-toolbar-primary-wide", className)}
      {...buttonProps}
    >
      {children ?? t("app_header.add_task")}
    </Button>
  );
};
