/** biome-ignore-all lint/correctness/useHookAtTopLevel: effect-fc HOC */ import { Callout, Flex, TextArea, type TextAreaProps } from "@radix-ui/themes" import { Array, type Equivalence, Option, ParseResult, type Schema, Struct } from "effect" import { Component } from "effect-fc" import { useInput } from "effect-fc/Hooks" import * as React from "react" export type TextAreaInputProps = Omit, "schema" | "equivalence"> & Omit export const TextAreaInput = (options: { readonly schema: Schema.Schema readonly equivalence?: Equivalence.Equivalence }): Component.Component< TextAreaInputProps, React.JSX.Element, ParseResult.ParseError, R > => Component.makeUntraced("TextFieldInput")(function*(props) { const input = yield* useInput({ ...options, ...props }) const issue = React.useMemo(() => input.error.pipe( Option.map(ParseResult.ArrayFormatter.formatErrorSync), Option.flatMap(Array.head), ), [input.error]) return (