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