38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
// Metro module 15577 (f15578).
|
|
import { useMemo } from "react";
|
|
import ThemedGradient from "./ThemedGradient";
|
|
import useIsUsingClientTheme from "./useIsUsingClientTheme";
|
|
import useSafeAreaInsets_native from "../../safe_area/useSafeAreaInsets.native";
|
|
import { isIOS } from "../../../utils/PlatformUtils";
|
|
import { isIpadOS } from "../../../utils/native/DeviceUtils";
|
|
let c11102_5;
|
|
const headerBackground = function headerBackground() {
|
|
return <ThemedGradient absolute tall wide />;
|
|
};
|
|
c11102_5 = {
|
|
headerBackground: void 0,
|
|
contentStyle: void 0
|
|
};
|
|
export default function useThemedHeaderOptions() {
|
|
const isUsingClientTheme = useIsUsingClientTheme();
|
|
let c22207_0 = isUsingClientTheme;
|
|
const top = useSafeAreaInsets_native().top;
|
|
return useMemo(() => {
|
|
if (c22207_0) {
|
|
if (isIOS()) {
|
|
return {
|
|
headerBackground,
|
|
contentStyle: {
|
|
marginTop: -top + (top > 50 ? 5 : 0) + (56 - (isIpadOS() ? 46 : 44))
|
|
}
|
|
};
|
|
}
|
|
return {
|
|
headerBackground,
|
|
contentStyle: c11102_5.contentStyle
|
|
};
|
|
}
|
|
return c11102_5;
|
|
}, [top, isUsingClientTheme]);
|
|
};
|