{"version":3,"names":["useAnimatedStyle","shouldBeUseWeb","useAnimatedProps","updater","deps","adapters"],"sources":["useAnimatedProps.ts"],"sourcesContent":["'use strict';\nimport { useAnimatedStyle } from './useAnimatedStyle';\nimport type { DependencyList } from './commonTypes';\nimport type {\n AnimatedPropsAdapterFunction,\n useAnimatedPropsType,\n} from '../helperTypes';\nimport { shouldBeUseWeb } from '../PlatformChecker';\n\n// TODO: we should make sure that when useAP is used we are not assigning styles\n// when you need styles to animated you should always use useAS\n// TODO TYPESCRIPT This is a temporary cast to get rid of .d.ts file.\n\n/**\n * Lets you create an animated props object which can be animated using shared values.\n *\n * @param updater - A function returning an object with properties you want to animate.\n * @param dependencies - An optional array of dependencies. Only relevant when using Reanimated without the Babel plugin on the Web.\n * @param adapters - An optional function or array of functions allowing to adopt prop naming between JS and the native side.\n * @returns An animated props object which has to be passed to `animatedProps` property of an Animated component that you want to animate.\n * @see https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedProps\n */\nexport let useAnimatedProps: useAnimatedPropsType;\n\nif (shouldBeUseWeb()) {\n useAnimatedProps = function <T extends object>(\n updater: () => Partial<T>,\n deps?: DependencyList | null,\n adapters?:\n | AnimatedPropsAdapterFunction\n | AnimatedPropsAdapterFunction[]\n | null\n ) {\n return (useAnimatedStyle as useAnimatedPropsType)(\n updater,\n deps,\n adapters,\n true\n );\n };\n} else {\n useAnimatedProps = useAnimatedStyle as useAnimatedPropsType;\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,gBAAgB,QAAQ,oBAAoB;AAMrD,SAASC,cAAc,QAAQ,oBAAoB;;AAEnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAIC,gBAAsC;AAEjD,IAAID,cAAc,EAAE,EAAE;EACpBC,gBAAgB,GAAG,SAAAA,CACjBC,OAAyB,EACzBC,IAA4B,EAC5BC,QAGQ,EACR;IACA,OAAQL,gBAAgB,CACtBG,OAAO,EACPC,IAAI,EACJC,QAAQ,EACR,IAAI,CACL;EACH,CAAC;AACH,CAAC,MAAM;EACLH,gBAAgB,GAAGF,gBAAwC;AAC7D"}