2026-08-15 05:55:55 +00:00
// Module ID: 1829
// Function ID: 1830
2026-07-29 08:29:29 +00:00
// Name: dispatchCommandFabric
2026-08-15 05:55:55 +00:00
// Dependencies: [1658, 1657]
2026-07-29 08:29:29 +00:00
2026-08-15 05:55:55 +00:00
// Module 1829 (dispatchCommandFabric)
2026-08-24 06:08:38 +00:00
import addLogBoxLog from "addLogBoxLog" /* 1658 */ ;
import isJest from "isJest" /* 1657 */ ;
2026-07-29 08:29:29 +00:00
function dispatchCommandFabric ( arg0 , arg1 ) {
let items = arg2 ;
if ( arg2 === undefined ) {
items = [ ] ;
}
if ( globalThis . _WORKLET ) {
const tmp3 = arg0 ( ) ;
if ( tmp3 ) {
const result = global . _dispatchCommandFabric ( tmp3 , arg1 , items ) ;
} else {
2026-08-24 06:08:38 +00:00
const logger = addLogBoxLog . logger ;
2026-07-29 08:29:29 +00:00
const _HermesInternal = HermesInternal ;
logger . warn ( "Tried to dispatch command \"" + arg1 + "\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it." ) ;
}
}
}
2026-08-24 06:08:38 +00:00
let obj = { logger : addLogBoxLog . logger } ;
2026-07-29 08:29:29 +00:00
dispatchCommandFabric . _ _closure = obj ;
dispatchCommandFabric . _ _workletHash = 9994297174981 ;
dispatchCommandFabric . _ _initData = { code : "function dispatchCommandFabric_Pnpm_dispatchCommandTs1(animatedRef,commandName,args=[]){const{logger}=this.__closure;if(!_WORKLET){return;}const shadowNodeWrapper=animatedRef();if(!shadowNodeWrapper){logger.warn(\"Tried to dispatch command \\\"\"+commandName+\"\\\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.\");return;}global._dispatchCommandFabric(shadowNodeWrapper,commandName,args);}" } ;
function dispatchCommandPaper ( arg0 , arg1 ) {
let items = arg2 ;
if ( arg2 === undefined ) {
items = [ ] ;
}
if ( globalThis . _WORKLET ) {
const tmp3 = arg0 ( ) ;
if ( tmp3 < 0 ) {
2026-08-24 06:08:38 +00:00
const logger = addLogBoxLog . logger ;
2026-07-29 08:29:29 +00:00
const _HermesInternal = HermesInternal ;
logger . warn ( "Tried to dispatch command \"" + arg1 + "\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it." ) ;
} else {
const result = global . _dispatchCommandPaper ( tmp3 , arg1 , items ) ;
}
}
}
2026-08-24 06:08:38 +00:00
obj = { logger : addLogBoxLog . logger } ;
2026-07-29 08:29:29 +00:00
dispatchCommandPaper . _ _closure = obj ;
dispatchCommandPaper . _ _workletHash = 16962176072769 ;
dispatchCommandPaper . _ _initData = { code : "function dispatchCommandPaper_Pnpm_dispatchCommandTs2(animatedRef,commandName,args=[]){const{logger}=this.__closure;if(!_WORKLET){return;}const viewTag=animatedRef();if(viewTag<0){logger.warn(\"Tried to dispatch command \\\"\"+commandName+\"\\\" with an uninitialized ref. Make sure to pass the animated ref to the component before using it.\");return;}global._dispatchCommandPaper(viewTag,commandName,args);}" } ;
isJest = isJest . shouldBeUseWeb ( ) ;
if ( isJest ) {
if ( isJest . isJest ( ) ) {
function dispatchCommandJest ( ) {
2026-08-24 06:08:38 +00:00
const logger = addLogBoxLog . logger ;
2026-07-29 08:29:29 +00:00
logger . warn ( "dispatchCommand() is not supported with Jest." ) ;
}
} else {
2026-08-24 06:08:38 +00:00
const _module2 = isJest ;
2026-07-29 08:29:29 +00:00
dispatchCommandJest = _module2 . isChromeDebugger ( ) ? ( function dispatchCommandChromeDebugger ( ) {
2026-08-24 06:08:38 +00:00
const logger = addLogBoxLog . logger ;
2026-07-29 08:29:29 +00:00
logger . warn ( "dispatchCommand() is not supported with Chrome Debugger." ) ;
} ) : ( function dispatchCommandDefault ( ) {
2026-08-24 06:08:38 +00:00
const logger = addLogBoxLog . logger ;
2026-07-29 08:29:29 +00:00
logger . warn ( "dispatchCommand() is not supported on this configuration." ) ;
} ) ;
}
} else {
if ( isJest . isFabric ( ) ) {
dispatchCommandPaper = dispatchCommandFabric ;
}
exports . dispatchCommand = dispatchCommandPaper ;
}