| 1 | import { View, StyleSheet, TouchableOpacity, ScrollView } from "react-native";
|
| 2 | import { Text } from "@/components/ui/Text";
|
| 3 | import { router } from "expo-router";
|
| 4 | import { Ionicons } from "@expo/vector-icons";
|
| 5 | import { SafeAreaView } from "react-native-safe-area-context";
|
| 6 |
|
| 7 | import { Button } from "@/components/ui/Button";
|
| 8 | import { Card } from "@/components/ui/Cards";
|
| 9 | import { Colors, Spacing, Typography, BorderRadius, Shadows } from "@/constants/theme";
|
| 10 | import { useCareActionLinkStore } from "@/stores";
|
| 11 |
|
| 12 | export default function PostAppointment() {
|
| 13 | return (
|
| 14 | <SafeAreaView style={styles.safe}>
|
| 15 | <ScrollView
|
| 16 | contentContainerStyle={styles.scrollContent}
|
| 17 | scrollEventThrottle={16}
|
| 18 | showsVerticalScrollIndicator={false}
|
| 19 | >
|
| 20 | {/* Confirmation block */}
|
| 21 | <View style={styles.confirmationBlock}>
|
| 22 | <View style={styles.outerRing}>
|
| 23 | <View style={styles.innerCircle}>
|
| 24 | <Ionicons name="checkmark" size={32} color="#fff" />
|
| 25 | </View>
|
| 26 | </View>
|
| 27 | <Text style={styles.confirmTitle}>Consulta Salva!</Text>
|
| 28 | <Text style={styles.confirmSubtitle}>
|
| 29 | Sua consulta foi registrada com sucesso.
|
| 30 | </Text>
|
| 31 | </View>
|
| 32 |
|
| 33 | {/* Follow-up card */}
|
| 34 | <Card style={styles.followUpCard}>
|
| 35 | <Text style={styles.followUpTitle}>Algo surgiu na sessão?</Text>
|
| 36 | <Text style={styles.followUpSubtitle}>
|
| 37 | Aproveite para registrar enquanto está fresco
|
| 38 | </Text>
|
| 39 |
|
| 40 | <TouchableOpacity
|
| 41 | style={styles.optionRow}
|
| 42 | activeOpacity={0.7}
|
| 43 | onPress={() => router.replace("/triggers/new?category=THERAPY")}
|
| 44 | >
|
| 45 | <View style={[styles.optionIcon, { backgroundColor: "#ede9fe" }]}>
|
| 46 | <Ionicons name="flash-outline" size={22} color="#7c3aed" />
|
| 47 | </View>
|
| 48 | <View style={styles.optionText}>
|
| 49 | <Text style={styles.optionTitle}>Criar um gatilho</Text>
|
| 50 | <Text style={styles.optionDesc}>
|
| 51 | Registre algo que emergiu na sessão
|
| 52 | </Text>
|
| 53 | </View>
|
| 54 | <Ionicons
|
| 55 | name="chevron-forward"
|
| 56 | size={18}
|
| 57 | color={Colors.light.disabled}
|
| 58 | />
|
| 59 | </TouchableOpacity>
|
| 60 |
|
| 61 | <TouchableOpacity
|
| 62 | style={styles.optionRow}
|
| 63 | activeOpacity={0.7}
|
| 64 | onPress={() => router.replace("/new/entry?initialMood=neutral")}
|
| 65 | >
|
| 66 | <View style={[styles.optionIcon, { backgroundColor: "#fef9c3" }]}>
|
| 67 | <Ionicons name="heart-outline" size={22} color="#ca8a04" />
|
| 68 | </View>
|
| 69 | <View style={styles.optionText}>
|
| 70 | <Text style={styles.optionTitle}>Registrar humor</Text>
|
| 71 | <Text style={styles.optionDesc}>
|
| 72 | Como você está se sentindo agora?
|
| 73 | </Text>
|
| 74 | </View>
|
| 75 | <Ionicons
|
| 76 | name="chevron-forward"
|
| 77 | size={18}
|
| 78 | color={Colors.light.disabled}
|
| 79 | />
|
| 80 | </TouchableOpacity>
|
| 81 | </Card>
|
| 82 |
|
| 83 | <Button
|
| 84 | title="Concluir"
|
| 85 | variant="ghost"
|
| 86 | onPress={() => {
|
| 87 | useCareActionLinkStore.getState().clear();
|
| 88 | router.replace("/(tabs)/actions");
|
| 89 | }}
|
| 90 | style={styles.concludeButton}
|
| 91 | />
|
| 92 | </ScrollView>
|
| 93 | </SafeAreaView>
|
| 94 | );
|
| 95 | }
|
| 96 |
|
| 97 | const styles = StyleSheet.create({
|
| 98 | safe: {
|
| 99 | flex: 1,
|
| 100 | backgroundColor: Colors.light.background,
|
| 101 | },
|
| 102 | scrollContent: {
|
| 103 | paddingHorizontal: Spacing.containerPadding,
|
| 104 | paddingTop: 48,
|
| 105 | paddingBottom: 36,
|
| 106 | },
|
| 107 | confirmationBlock: {
|
| 108 | alignItems: "center",
|
| 109 | marginBottom: Spacing.sectionGap,
|
| 110 | gap: 12,
|
| 111 | },
|
| 112 | outerRing: {
|
| 113 | width: 88,
|
| 114 | height: 88,
|
| 115 | borderRadius: 44,
|
| 116 | backgroundColor: "#E7FDEF",
|
| 117 | alignItems: "center",
|
| 118 | justifyContent: "center",
|
| 119 | },
|
| 120 | innerCircle: {
|
| 121 | width: 64,
|
| 122 | height: 64,
|
| 123 | borderRadius: 32,
|
| 124 | backgroundColor: Colors.light.tint,
|
| 125 | alignItems: "center",
|
| 126 | justifyContent: "center",
|
| 127 | },
|
| 128 | confirmTitle: {
|
| 129 | ...Typography.headlineMd,
|
| 130 | fontWeight: "700",
|
| 131 | color: Colors.light.text,
|
| 132 | textAlign: "center",
|
| 133 | },
|
| 134 | confirmSubtitle: {
|
| 135 | ...Typography.bodyMd,
|
| 136 | color: Colors.light.textSecondary,
|
| 137 | textAlign: "center",
|
| 138 | },
|
| 139 | followUpCard: {
|
| 140 | padding: Spacing.cardGap,
|
| 141 | marginBottom: Spacing.sectionGap,
|
| 142 | gap: 12,
|
| 143 | },
|
| 144 | followUpTitle: {
|
| 145 | ...Typography.headlineMd,
|
| 146 | fontWeight: "700",
|
| 147 | color: Colors.light.text,
|
| 148 | marginBottom: 2,
|
| 149 | },
|
| 150 | followUpSubtitle: {
|
| 151 | ...Typography.bodyMd,
|
| 152 | color: Colors.light.textSecondary,
|
| 153 | marginBottom: 8,
|
| 154 | },
|
| 155 | optionRow: {
|
| 156 | flexDirection: "row",
|
| 157 | alignItems: "center",
|
| 158 | padding: Spacing.cardGap,
|
| 159 | backgroundColor: "#fff",
|
| 160 | borderRadius: BorderRadius.lg,
|
| 161 | borderWidth: 1,
|
| 162 | borderColor: Colors.light.divider,
|
| 163 | gap: 12,
|
| 164 | ...Shadows.sm,
|
| 165 | },
|
| 166 | optionIcon: {
|
| 167 | width: 44,
|
| 168 | height: 44,
|
| 169 | borderRadius: BorderRadius.md,
|
| 170 | alignItems: "center",
|
| 171 | justifyContent: "center",
|
| 172 | },
|
| 173 | optionText: {
|
| 174 | flex: 1,
|
| 175 | gap: 2,
|
| 176 | },
|
| 177 | optionTitle: {
|
| 178 | ...Typography.bodyMd,
|
| 179 | fontWeight: "600",
|
| 180 | color: Colors.light.text,
|
| 181 | },
|
| 182 | optionDesc: {
|
| 183 | ...Typography.labelSm,
|
| 184 | color: Colors.light.textSecondary,
|
| 185 | },
|
| 186 | concludeButton: {
|
| 187 | marginTop: 8,
|
| 188 | },
|
| 189 | });
|