import { TokenState } from '@specifyapp/specify-design-token-format'; export function doesTokenBelongToSameCollection(token1: TokenState, token2: TokenState) { const collection1 = token1.getCollection(); const collection2 = token2.getCollection(); if (!collection1 && !collection2) return true; if (!collection1 || !collection2) return false; return collection1.path.toString() === collection2.path.toString(); }