import type { Props } from './types';
import type { MetaObject } from '@/api/ius/types';
import { mapFieldTypeElement } from '@/config/elements';
import { useFormStore } from '@/store/ius/form';
import { ElementContainer } from '@repo/ui';
import { get, omit } from 'radash';
import { useEffect } from 'react';
function RenderElement({
fieldType,
label,
max,
min = 0,
name,
visible,
...props
}: MetaObject & { readonly name: string }) {
const { setValue, validation, values } = useFormStore();
if (!visible) return false;
const Element = mapFieldTypeElement[fieldType];
return (