import React from 'react';
import { Plus, Minus } from 'lucide-react';
import TextareaAutosize from 'react-textarea-autosize';
import { ExamplesProps } from 'librechat-data-provider';
import { Button, Label } from '~/components/ui';
import { cn, defaultTextProps } from '~/utils/';
import { useLocalize } from '~/hooks';
function Examples({ readonly, examples, setExample, addExample, removeExample }: ExamplesProps) {
const localize = useLocalize();
return (
<>
{examples.map((example, idx) => (
{/* Input */}
setExample(idx, 'input', e.target.value ?? null)}
placeholder="Set example input. Example is ignored if empty."
className={cn(
defaultTextProps,
'flex max-h-[300px] min-h-[75px] w-full resize-none px-3 py-2 ',
)}
/>
{/* Output */}
setExample(idx, 'output', e.target.value ?? null)}
placeholder={'Set example output. Example is ignored if empty.'}
className={cn(
defaultTextProps,
'flex max-h-[300px] min-h-[75px] w-full resize-none px-3 py-2 ',
)}
/>
))}
>
);
}
export default Examples;