Files
discord-decomp/_bundle/Module1786.js
T
2026-11-01 12:12:55 +02:00

62 lines
2.7 KiB
JavaScript

// Metro module 1786 (f1787).
import * as _Module1610 from "./Module1610";
import * as _hue2rgb from "./hue2rgb";
import { shouldBeUseWeb, isJest, isChromeDebugger, isFabric } from "./Module1609";
const setNativePropsFabric = function setNativePropsFabric(a0, a1) {
if (_WORKLET) {
const shadowNodeWrapper = a0();
_hue2rgb.processColorsInProps(a1);
global._updatePropsFabric([{
shadowNodeWrapper,
updates: a1
}]);
} else {
_Module1610.logger.warn("setNativeProps() can only be used on the UI runtime.");
}
};
setNativePropsFabric.__closure = {
logger: _Module1610.logger,
processColorsInProps: _hue2rgb.processColorsInProps
};
setNativePropsFabric.__workletHash = 13825557000530;
setNativePropsFabric.__initData = {
code: "function setNativePropsFabric_Pnpm_setNativePropsTs1(animatedRef,updates){const{logger,processColorsInProps}=this.__closure;if(!_WORKLET){logger.warn('setNativeProps() can only be used on the UI runtime.');return;}const shadowNodeWrapper=animatedRef();processColorsInProps(updates);global._updatePropsFabric([{shadowNodeWrapper:shadowNodeWrapper,updates:updates}]);}"
};
let r22 = function setNativePropsPaper(a0, a1) {
if (_WORKLET) {
const tag = a0();
let name = a0.viewName?.value;
if (name == null) {
name = null;
}
_hue2rgb.processColorsInProps(a1);
global._updatePropsPaper([{
tag,
name,
updates: a1
}]);
} else {
_Module1610.logger.warn("setNativeProps() can only be used on the UI runtime.");
}
};
r22.__closure = {
logger: _Module1610.logger,
processColorsInProps: _hue2rgb.processColorsInProps
};
r22.__workletHash = 9895881337862;
r22.__initData = {
code: "function setNativePropsPaper_Pnpm_setNativePropsTs2(animatedRef,updates){const{logger,processColorsInProps}=this.__closure;var _viewName$value,_viewName;if(!_WORKLET){logger.warn('setNativeProps() can only be used on the UI runtime.');return;}const tag=animatedRef();const name=(_viewName$value=(_viewName=animatedRef.viewName)===null||_viewName===void 0?void 0:_viewName.value)!==null&&_viewName$value!==void 0?_viewName$value:null;processColorsInProps(updates);global._updatePropsPaper([{tag:tag,name:name,updates:updates}]);}"
};
if (shouldBeUseWeb()) {
r22 = isJest() ? function setNativePropsJest() {
_Module1610.logger.warn("setNativeProps() is not supported with Jest.");
} : isChromeDebugger() ? function setNativePropsChromeDebugger() {
_Module1610.logger.warn("setNativeProps() is not supported with Chrome Debugger.");
} : function setNativePropsDefault() {
_Module1610.logger.warn("setNativeProps() is not supported on this configuration.");
};
} else if (isFabric()) {
r22 = setNativePropsFabric;
}
export { r22 as setNativeProps };