import { useMemo } from 'react';

import { LL } from '@/lang/LL';
import useAppConfigStore from '@/stores/appConfig';

import { ItemDataProps } from '../types';

const DataDescription = (props: ItemDataProps) => {


    if (props.parent?.type == 'array') return null;

    const { hideTips } = useAppConfigStore();


    if (hideTips) return null;

    const description = useMemo(() => {
        return props.structure.description ?? "";
    }, [props.structure.description]);





    if (!description) {


        return null;
    }


    return <>


        <div className='text-[10px] text-muted-foreground px-1 my-1'><LL value={description} /></div>
    </>
}

export default DataDescription;