93 lines
2.7 KiB
React
93 lines
2.7 KiB
React
// Metro module 8257 (f8258).
|
|
import Module19 from "react";
|
|
import { Appearance, Platform, Text } from "react-native";
|
|
import { DatePickerAndroid } from "./getStyle";
|
|
import { colorToHex } from "./Module8262";
|
|
let getDividerColor, getTextColor, getButtonColor, getTitle;
|
|
Platform;
|
|
Text;
|
|
const getTheme = (a0) => {};
|
|
getDividerColor = (a0) => {};
|
|
getTextColor = (a0) => {};
|
|
getButtonColor = (a0) => {};
|
|
getTitle = (a0) => {};
|
|
export default Module19.memo((a0) => {
|
|
let dividerColor, theme, theme2, theme3, theme4;
|
|
if (a0.theme) {
|
|
theme = a0.theme;
|
|
} else {
|
|
theme = "auto";
|
|
if (Appearance) {
|
|
const colorScheme = Appearance.getColorScheme();
|
|
theme = colorScheme !== null ? colorScheme : void 0;
|
|
}
|
|
}
|
|
let r30 = "white";
|
|
const props = {
|
|
...a0,
|
|
textColor: colorToHex(theme !== "dark" ? theme === "light" ? "black" : void 0 : "white")
|
|
};
|
|
if (a0.dividerColor) {
|
|
dividerColor = a0.dividerColor;
|
|
} else {
|
|
if (a0.theme) {
|
|
theme2 = a0.theme;
|
|
} else {
|
|
theme2 = "auto";
|
|
if (Appearance) {
|
|
const colorScheme2 = Appearance.getColorScheme();
|
|
theme2 = colorScheme2 !== null ? colorScheme2 : void 0;
|
|
}
|
|
}
|
|
dividerColor = theme2 !== "dark" ? theme2 === "light" ? "black" : void 0 : "white";
|
|
}
|
|
props.dividerColor = colorToHex(dividerColor);
|
|
if (a0.buttonColor) {
|
|
r30 = a0.buttonColor;
|
|
} else {
|
|
if (a0.theme) {
|
|
theme3 = a0.theme;
|
|
} else {
|
|
theme3 = "auto";
|
|
if (Appearance) {
|
|
const colorScheme3 = Appearance.getColorScheme();
|
|
theme3 = colorScheme3 !== null ? colorScheme3 : void 0;
|
|
}
|
|
}
|
|
if (theme3 !== "dark") {
|
|
r30 = theme3 === "light" ? "black" : void 0;
|
|
}
|
|
}
|
|
props.buttonColor = colorToHex(r30);
|
|
if (a0.theme) {
|
|
theme4 = a0.theme;
|
|
} else {
|
|
theme4 = "auto";
|
|
if (Appearance) {
|
|
const colorScheme4 = Appearance.getColorScheme();
|
|
theme4 = colorScheme4 !== null ? colorScheme4 : void 0;
|
|
}
|
|
}
|
|
props.theme = theme4;
|
|
let title = a0.title;
|
|
const mode = a0.mode;
|
|
let timeZoneOffsetInMinutes = "";
|
|
let title2 = "";
|
|
if (title !== null) {
|
|
if (!title) {
|
|
title = mode === "time" ? "Select time" : "Select date";
|
|
}
|
|
title2 = title;
|
|
}
|
|
props.title = title2;
|
|
props.confirmText = a0.confirmText ? a0.confirmText : "Confirm";
|
|
props.cancelText = a0.cancelText ? a0.cancelText : "Cancel";
|
|
props.minuteInterval = a0.minuteInterval ? a0.minuteInterval : 1;
|
|
props.mode = a0.mode ? a0.mode : "datetime";
|
|
if (a0.timeZoneOffsetInMinutes != null) {
|
|
timeZoneOffsetInMinutes = a0.timeZoneOffsetInMinutes.toString();
|
|
}
|
|
props.timeZoneOffsetInMinutes = timeZoneOffsetInMinutes;
|
|
return <DatePickerAndroid {...props} />;
|
|
});
|