1import { Platform } from 'expo-modules-core';
2// @ts-ignore: untyped
3import normalizeColor from 'react-native-web/dist/cjs/modules/normalizeColor';
4
5export default {
6  get name(): string {
7    return 'ExpoSystemUI';
8  },
9  getBackgroundColorAsync() {
10    if (Platform.isDOMAvailable) {
11      return normalizeColor(document.body.style.backgroundColor);
12    } else {
13      return null;
14    }
15  },
16  setBackgroundColorAsync(color: string | null) {
17    if (Platform.isDOMAvailable) {
18      document.body.style.backgroundColor = color ?? 'white';
19    }
20  },
21};
22