import { useMemo } from 'react';
import remend from 'remend';
export function useRemend(content, enabled) {
    return useMemo(() => {
        if (typeof content !== 'string' || content === '') {
            return '';
        }
        if (!enabled) {
            return content;
        }
        try {
            return remend(content.trim());
        }
        catch (_a) {
            return content;
        }
    }, [content, enabled]);
}
//# sourceMappingURL=useRemend.js.map
