{"version":3,"sources":["useIsKeyboardShown.tsx"],"names":["useIsKeyboardShown","isKeyboardShown","setIsKeyboardShown","React","useState","useEffect","handleKeyboardShow","handleKeyboardHide","Platform","OS","Keyboard","addListener","removeListener"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEe,SAASA,kBAAT,GAA8B;AAC3C,QAAM,CAACC,eAAD,EAAkBC,kBAAlB,IAAwCC,KAAK,CAACC,QAAN,CAAe,KAAf,CAA9C;AAEAD,EAAAA,KAAK,CAACE,SAAN,CAAgB,MAAM;AACpB,UAAMC,kBAAkB,GAAG,MAAMJ,kBAAkB,CAAC,IAAD,CAAnD;;AACA,UAAMK,kBAAkB,GAAG,MAAML,kBAAkB,CAAC,KAAD,CAAnD;;AAEA,QAAIM,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzBC,4BAASC,WAAT,CAAqB,kBAArB,EAAyCL,kBAAzC;;AACAI,4BAASC,WAAT,CAAqB,kBAArB,EAAyCJ,kBAAzC;AACD,KAHD,MAGO;AACLG,4BAASC,WAAT,CAAqB,iBAArB,EAAwCL,kBAAxC;;AACAI,4BAASC,WAAT,CAAqB,iBAArB,EAAwCJ,kBAAxC;AACD;;AAED,WAAO,MAAM;AACX,UAAIC,sBAASC,EAAT,KAAgB,KAApB,EAA2B;AACzBC,8BAASE,cAAT,CAAwB,kBAAxB,EAA4CN,kBAA5C;;AACAI,8BAASE,cAAT,CAAwB,kBAAxB,EAA4CL,kBAA5C;AACD,OAHD,MAGO;AACLG,8BAASE,cAAT,CAAwB,iBAAxB,EAA2CN,kBAA3C;;AACAI,8BAASE,cAAT,CAAwB,iBAAxB,EAA2CL,kBAA3C;AACD;AACF,KARD;AASD,GArBD,EAqBG,EArBH;AAuBA,SAAON,eAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { Keyboard, Platform } from 'react-native';\n\nexport default function useIsKeyboardShown() {\n const [isKeyboardShown, setIsKeyboardShown] = React.useState(false);\n\n React.useEffect(() => {\n const handleKeyboardShow = () => setIsKeyboardShown(true);\n const handleKeyboardHide = () => setIsKeyboardShown(false);\n\n if (Platform.OS === 'ios') {\n Keyboard.addListener('keyboardWillShow', handleKeyboardShow);\n Keyboard.addListener('keyboardWillHide', handleKeyboardHide);\n } else {\n Keyboard.addListener('keyboardDidShow', handleKeyboardShow);\n Keyboard.addListener('keyboardDidHide', handleKeyboardHide);\n }\n\n return () => {\n if (Platform.OS === 'ios') {\n Keyboard.removeListener('keyboardWillShow', handleKeyboardShow);\n Keyboard.removeListener('keyboardWillHide', handleKeyboardHide);\n } else {\n Keyboard.removeListener('keyboardDidShow', handleKeyboardShow);\n Keyboard.removeListener('keyboardDidHide', handleKeyboardHide);\n }\n };\n }, []);\n\n return isKeyboardShown;\n}\n"]}