function getClosestEditorContainer(element) {
    const container = element.closest('affine-editor-container');
    return container;
}
export function listenToThemeChange(currentELement, callback) {
    const container = getClosestEditorContainer(currentELement);
    if (!container)
        return;
    return container.themeObserver.on(callback);
}
export function getThemePropertyValue(currentELement, name) {
    const container = getClosestEditorContainer(currentELement);
    if (!container)
        return;
    return container.themeObserver.cssVariables?.[name];
}
//# sourceMappingURL=utils.js.map