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

import { WizardInputField } from "@/components/providers/workflow/forms/fields";
import { IacCredentials } from "@/types";

export const IacCredentialsForm = ({
  control,
}: {
  control: Control<IacCredentials>;
}) => {
  return (
    <>
      <div className="flex flex-col">
        <div className="text-md text-text-neutral-primary leading-9 font-bold">
          Connect via Repository
        </div>
        <div className="text-text-neutral-tertiary text-sm">
          Provide an access token if the repository is private (optional).
        </div>
      </div>
      <WizardInputField
        control={control}
        name="access_token"
        label="Access Token (Optional)"
        labelPlacement="inside"
        placeholder="Token for private repositories (optional)"
        variant="bordered"
        type="password"
        isRequired={false}
      />
    </>
  );
};
