export function assertFlavours(model, allowed) {
    if (!allowed.includes(model.flavour)) {
        throw new Error(`model flavour ${model.flavour} is not allowed`);
    }
}
export function matchFlavours(model, expected) {
    return !!model && expected.includes(model.flavour);
}
export function isInsideBlockByFlavour(page, block, flavour) {
    const parent = page.getParent(block);
    if (parent === null) {
        return false;
    }
    if (flavour === parent.flavour) {
        return true;
    }
    return isInsideBlockByFlavour(page, parent, flavour);
}
//# sourceMappingURL=model.js.map