import { Control } from "react-hook-form";

import { WizardTextareaField } from "@/components/providers/workflow/forms/fields";
import { GCPServiceAccountKey } from "@/types";

export const GCPServiceAccountKeyForm = ({
  control,
}: {
  control: Control<GCPServiceAccountKey>;
}) => {
  return (
    <>
      <div className="flex flex-col">
        <div className="text-md text-text-neutral-primary leading-9 font-bold">
          Connect via Service Account Key
        </div>
        <div className="text-text-neutral-tertiary text-sm">
          Please provide the service account key for your GCP credentials.
        </div>
      </div>
      <WizardTextareaField
        control={control}
        name="service_account_key"
        label="Service Account Key"
        labelPlacement="inside"
        placeholder="Paste your Service Account Key JSON content here"
        variant="bordered"
        minRows={10}
        isRequired
      />
    </>
  );
};
