64 lines
2.2 KiB
TypeScript
64 lines
2.2 KiB
TypeScript
// Metro module 12547 (f12548).
|
|
import { TouchableOpacity, View } from "react-native";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
let useStyles;
|
|
const handlePress = function handlePress() {
|
|
ActionSheetActionCreators.openLazy(import("./NitroCreditEducationActionSheet"), "NitroCreditEducationActionSheet", {
|
|
aboutText: intl.string(t["07lzz7"])
|
|
});
|
|
};
|
|
useStyles = createStyles({
|
|
fractionalPremiumBanner: {
|
|
backgroundColor: Module712.colors.BACKGROUND_SURFACE_HIGH,
|
|
flexDirection: "row",
|
|
gap: 12,
|
|
padding: 12,
|
|
justifyContent: "center",
|
|
borderColor: Module712.colors.STATUS_WARNING,
|
|
borderWidth: 1,
|
|
borderRadius: Module712.radii.lg,
|
|
marginBottom: 12
|
|
},
|
|
fpDurationPill: {
|
|
flex: 1,
|
|
paddingVertical: 12,
|
|
paddingHorizontal: 27,
|
|
backgroundColor: Module712.colors.BACKGROUND_MOD_STRONG,
|
|
borderRadius: Module712.radii.xxl,
|
|
justifyContent: "center"
|
|
},
|
|
fpDurationText: {
|
|
textAlign: "center",
|
|
color: "#FFEAA0"
|
|
},
|
|
fpUnavailable: {
|
|
flex: 1,
|
|
justifyContent: "center"
|
|
},
|
|
fpUnavailableTextNoCountdown: {
|
|
textAlign: "center"
|
|
}
|
|
});
|
|
export default function BoostingCountDownPill(props) {
|
|
const { fpDurationText, isInReverseTrial, style } = props;
|
|
const styles = useStyles();
|
|
return <TouchableOpacity activeOpacity={0.7} onPress={isInReverseTrial ? void 0 : handlePress}>
|
|
<View style={[styles.fractionalPremiumBanner, style]}>
|
|
{isInReverseTrial ? !isInReverseTrial : <View style={styles.fpDurationPill}>
|
|
<Text variant="text-sm/bold" style={styles.fpDurationText}>
|
|
{fpDurationText.toUpperCase()}
|
|
</Text>
|
|
</View>}
|
|
<View style={styles.fpUnavailable}>
|
|
<Text variant="text-md/normal" color="interactive-text-active" style={isInReverseTrial ? styles.fpUnavailableTextNoCountdown : void 0}>
|
|
{intl.string(t["5nrJDO"])}
|
|
</Text>
|
|
</View>
|
|
</View>
|
|
</TouchableOpacity>;
|
|
};
|