import { VNode, h } from "preact";
import {
  InputLine,
  LabelWithTooltipMaybeRequired,
  UIFormProps,
} from "./InputLine.js";
import { TranslatedString } from "@gnu-taler/taler-util";

interface Props {
  label: TranslatedString;
  tooltip?: TranslatedString;
  help?: TranslatedString;
}

export function Separator({ label, tooltip, help }: Props): VNode {
  return (
    <div class="sm:col-span-6">
      <LabelWithTooltipMaybeRequired label={label} tooltip={tooltip} />
      {help && (
        <p class="mt-2 text-sm text-gray-500" id="email-description">
          {help}
        </p>
      )}
    </div>
  );
}
