import { useEffect, useMemo } from 'react';
import { ErrorService } from '../../../../../services/ErrorService';
import { getAcceptMeta, validateAcceptMeta } from './utils';
export const usePrepareAccept = (accept) => {
    const meta = useMemo(() => getAcceptMeta(accept), [accept]);
    useEffect(() => {
        const error = validateAcceptMeta(meta);
        if (error) {
            const errorService = ErrorService.getInstance();
            errorService.logError('FileUploader', error);
        }
    }, [meta]);
    return meta;
};
