"use client"; import type { ChangeEvent } from "react"; import { Field, FieldError, FieldLabel } from "@/components/shadcn/field/field"; import { Input } from "@/components/shadcn/input/input"; import { cn } from "@/lib/utils"; interface CustomServerInputProps { name: string; label?: string; labelPlacement?: "inside" | "outside"; variant?: "flat" | "bordered" | "underlined" | "faded"; type?: string; placeholder?: string; isRequired?: boolean; isInvalid?: boolean; errorMessage?: string; value?: string; onChange?: (e: ChangeEvent) => void; } /** * Custom input component that is used to display a server input without useForm hook. */ export const CustomServerInput = ({ name, type = "text", label, labelPlacement = "outside", placeholder, variant = "bordered", isRequired = false, isInvalid = false, errorMessage, value, onChange, }: CustomServerInputProps) => { void variant; return ( {label && ( {label} {isRequired && *} )} {isInvalid && errorMessage && {errorMessage}} ); };