113c5c8bdSEvan Bacon"use strict"; 213c5c8bdSEvan BaconObject.defineProperty(exports, "__esModule", { value: true }); 313c5c8bdSEvan Baconexports.getRootViewBackgroundColor = exports.withRootViewBackgroundColorStyles = exports.withRootViewBackgroundColorColors = exports.withAndroidRootViewBackgroundColor = void 0; 4*957cf079STomasz Sapetaconst config_plugins_1 = require("expo/config-plugins"); 513c5c8bdSEvan Baconconst { assignColorValue } = config_plugins_1.AndroidConfig.Colors; 613c5c8bdSEvan Baconconst { assignStylesValue, getAppThemeLightNoActionBarGroup } = config_plugins_1.AndroidConfig.Styles; 713c5c8bdSEvan Baconconst ANDROID_WINDOW_BACKGROUND = 'android:windowBackground'; 813c5c8bdSEvan Baconconst WINDOW_BACKGROUND_COLOR = 'activityBackground'; 913c5c8bdSEvan Baconconst withAndroidRootViewBackgroundColor = (config) => { 1013c5c8bdSEvan Bacon config = (0, exports.withRootViewBackgroundColorColors)(config); 1113c5c8bdSEvan Bacon config = (0, exports.withRootViewBackgroundColorStyles)(config); 1213c5c8bdSEvan Bacon return config; 1313c5c8bdSEvan Bacon}; 1413c5c8bdSEvan Baconexports.withAndroidRootViewBackgroundColor = withAndroidRootViewBackgroundColor; 1513c5c8bdSEvan Baconconst withRootViewBackgroundColorColors = (config) => { 1613c5c8bdSEvan Bacon return (0, config_plugins_1.withAndroidColors)(config, async (config) => { 1713c5c8bdSEvan Bacon config.modResults = assignColorValue(config.modResults, { 1813c5c8bdSEvan Bacon value: getRootViewBackgroundColor(config), 1913c5c8bdSEvan Bacon name: WINDOW_BACKGROUND_COLOR, 2013c5c8bdSEvan Bacon }); 2113c5c8bdSEvan Bacon return config; 2213c5c8bdSEvan Bacon }); 2313c5c8bdSEvan Bacon}; 2413c5c8bdSEvan Baconexports.withRootViewBackgroundColorColors = withRootViewBackgroundColorColors; 2513c5c8bdSEvan Baconconst withRootViewBackgroundColorStyles = (config) => { 2613c5c8bdSEvan Bacon return (0, config_plugins_1.withAndroidStyles)(config, async (config) => { 2713c5c8bdSEvan Bacon config.modResults = assignStylesValue(config.modResults, { 2813c5c8bdSEvan Bacon add: !!getRootViewBackgroundColor(config), 2913c5c8bdSEvan Bacon parent: getAppThemeLightNoActionBarGroup(), 3013c5c8bdSEvan Bacon name: ANDROID_WINDOW_BACKGROUND, 3113c5c8bdSEvan Bacon value: `@color/${WINDOW_BACKGROUND_COLOR}`, 3213c5c8bdSEvan Bacon }); 3313c5c8bdSEvan Bacon return config; 3413c5c8bdSEvan Bacon }); 3513c5c8bdSEvan Bacon}; 3613c5c8bdSEvan Baconexports.withRootViewBackgroundColorStyles = withRootViewBackgroundColorStyles; 3713c5c8bdSEvan Baconfunction getRootViewBackgroundColor(config) { 3844e1f840SEvan Bacon return config.android?.backgroundColor || config.backgroundColor || null; 3913c5c8bdSEvan Bacon} 4013c5c8bdSEvan Baconexports.getRootViewBackgroundColor = getRootViewBackgroundColor; 41