import type { Validation } from "../../types";

export type GetValidationClassesProps = Pick<Validation, "isInvalid">;

export const useValidationClasses = (props: GetValidationClassesProps) => {
  const { isInvalid } = props;

  if (isInvalid) {
    return "--is-invalid";
  }

  if (isInvalid === false) {
    return "--is-valid";
  }

  return "";
};
