1 import { useMemo } from 'react';
3 import { deobfuscateItem } from '@proton/pass/lib/items/item.obfuscation';
4 import type { Item, ItemType, UnsafeItem } from '@proton/pass/types';
6 export const useDeobfuscatedItem = <T extends ItemType>(item: Item<T>) =>
7 useMemo(() => deobfuscateItem(item as Item) as UnsafeItem<T>, [item]);