{"version":3,"names":["Platform","formSheetModalHeight","getDefaultHeaderHeight","layout","statusBarHeight","stackPresentation","isLargeHeader","arguments","length","undefined","headerHeight","OS","isLandscape","width","height","isFormSheetModal","isPad","isTV"],"sources":["getDefaultHeaderHeight.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport { StackPresentationTypes } from 'react-native-screens';\ntype Layout = { width: number; height: number };\n\nconst formSheetModalHeight = 56;\n\nexport default function getDefaultHeaderHeight(\n layout: Layout,\n statusBarHeight: number,\n stackPresentation: StackPresentationTypes,\n isLargeHeader = false\n): number {\n // default header heights\n let headerHeight = Platform.OS === 'android' ? 56 : 64;\n\n if (Platform.OS === 'ios') {\n const isLandscape = layout.width > layout.height;\n const isFormSheetModal =\n stackPresentation === 'modal' || stackPresentation === 'formSheet';\n if (isFormSheetModal && !isLandscape) {\n // `modal` and `formSheet` presentations do not take whole screen, so should not take the inset.\n statusBarHeight = 0;\n }\n\n if (Platform.isPad || Platform.isTV) {\n headerHeight = isFormSheetModal ? formSheetModalHeight : 50;\n } else {\n if (isLandscape) {\n headerHeight = 32;\n } else {\n if (isFormSheetModal) {\n headerHeight = formSheetModalHeight;\n } else {\n headerHeight = isLargeHeader ? 96 : 44;\n }\n }\n }\n }\n\n return headerHeight + statusBarHeight;\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAIvC,MAAMC,oBAAoB,GAAG,EAAE;AAE/B,eAAe,SAASC,sBAAsBA,CAC5CC,MAAc,EACdC,eAAuB,EACvBC,iBAAyC,EAEjC;EAAA,IADRC,aAAa,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAErB;EACA,IAAIG,YAAY,GAAGV,QAAQ,CAACW,EAAE,KAAK,SAAS,GAAG,EAAE,GAAG,EAAE;EAEtD,IAAIX,QAAQ,CAACW,EAAE,KAAK,KAAK,EAAE;IACzB,MAAMC,WAAW,GAAGT,MAAM,CAACU,KAAK,GAAGV,MAAM,CAACW,MAAM;IAChD,MAAMC,gBAAgB,GACpBV,iBAAiB,KAAK,OAAO,IAAIA,iBAAiB,KAAK,WAAW;IACpE,IAAIU,gBAAgB,IAAI,CAACH,WAAW,EAAE;MACpC;MACAR,eAAe,GAAG,CAAC;IACrB;IAEA,IAAIJ,QAAQ,CAACgB,KAAK,IAAIhB,QAAQ,CAACiB,IAAI,EAAE;MACnCP,YAAY,GAAGK,gBAAgB,GAAGd,oBAAoB,GAAG,EAAE;IAC7D,CAAC,MAAM;MACL,IAAIW,WAAW,EAAE;QACfF,YAAY,GAAG,EAAE;MACnB,CAAC,MAAM;QACL,IAAIK,gBAAgB,EAAE;UACpBL,YAAY,GAAGT,oBAAoB;QACrC,CAAC,MAAM;UACLS,YAAY,GAAGJ,aAAa,GAAG,EAAE,GAAG,EAAE;QACxC;MACF;IACF;EACF;EAEA,OAAOI,YAAY,GAAGN,eAAe;AACvC"}