import type { AllowDeny } from '../types'; export const isItemAllowed = (itemId: T, items?: AllowDeny) => { if (items?.allow?.length) { return items.allow.includes(itemId); } return !items?.deny?.includes(itemId); };