59 lines
2.5 KiB
TypeScript
59 lines
2.5 KiB
TypeScript
// Metro module 11094 (f11095).
|
|
import { useState } from "react";
|
|
import { View } from "react-native";
|
|
import SafetyHubStore from "../SafetyHubStore";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import { useStateFromStores } from "../../../_bundle/Module589";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { BottomSheet } from "../../../design/components/Sheet/native/BottomSheet.native";
|
|
import { Stack } from "../../../design/components/Stack/native/Stack.native";
|
|
import { PressableOpacity } from "../../../design/void/Pressables/native/Pressables";
|
|
import { XSmallIcon } from "../../../design/components/Icon/native/redesign/generated/XSmallIcon";
|
|
import { AppealIngestionModalHeader } from "./AppealIngestionModal";
|
|
import { TextArea } from "../../../design/components/TextInput/native/TextArea.native";
|
|
import { Text } from "../../../design/components/Text/native/Text";
|
|
import { Button } from "../../../design/components/Button/native/Button.native";
|
|
const useStyles = createStyles({
|
|
footerText: {
|
|
textAlign: "center"
|
|
},
|
|
textArea: {
|
|
marginTop: -16,
|
|
marginBottom: 36
|
|
},
|
|
separator: {
|
|
height: 1,
|
|
backgroundColor: Module712.colors.BORDER_SUBTLE,
|
|
marginHorizontal: -16
|
|
},
|
|
closeIcon: {
|
|
alignSelf: "flex-end",
|
|
flexDirection: "row",
|
|
marginBottom: -26
|
|
}
|
|
});
|
|
export default function AppealIngestionFreeTextAppealReasonActionSheet(props) {
|
|
let state;
|
|
const { onSave, onClose } = props;
|
|
state = void 0;
|
|
const styles = useStyles();
|
|
const stateFromStores = useStateFromStores([SafetyHubStore], () => SafetyHubStore.getFreeTextAppealReason());
|
|
let onChange;
|
|
[state, onChange] = useState(stateFromStores);
|
|
return <BottomSheet startExpanded>
|
|
<Stack spacing={16}>
|
|
<PressableOpacity onPress={onClose} style={styles.closeIcon}>
|
|
<XSmallIcon size="md" />
|
|
</PressableOpacity>
|
|
<AppealIngestionModalHeader headerText={stateFromStores === "" ? intl.string(t.uoQFIp) : intl.string(t.tnE3bZ)} subHeaderText={intl.string(t["Rk+uJx"])} />
|
|
<TextArea maxLength={1024} placeholder={intl.string(t.bQrZIN)} containerStyle={styles.textArea} value={state} onChange={onChange} />
|
|
<View style={styles.separator} />
|
|
<Text variant="text-xs/medium" color="text-default" style={styles.footerText}>
|
|
{intl.string(t.xfNY3L)}
|
|
</Text>
|
|
<Button onPress={() => onSave(state)} text={intl.string(t["R3BPH+"])} />
|
|
</Stack>
|
|
</BottomSheet>;
|
|
};
|