eletrotupi / tcc/ frontend/app/care-actions/post-appointment.tsxd8d5424a8ec32b325e17aa210b8b18da460390d4
5.1 KB | 185 lines Raw
1
import { View, Text, StyleSheet, TouchableOpacity, ScrollView } from "react-native";
2
import { router } from "expo-router";
3
import { Ionicons } from "@expo/vector-icons";
4
import { SafeAreaView } from "react-native-safe-area-context";
5

6
import { Button } from "@/components/ui/Button";
7
import { Card } from "@/components/ui/Cards";
8
import { Colors, Spacing, Typography, BorderRadius, Shadows } from "@/constants/theme";
9

10
export default function PostAppointment() {
11
  return (
12
    <SafeAreaView style={styles.safe}>
13
      <ScrollView
14
        contentContainerStyle={styles.scrollContent}
15
        scrollEventThrottle={16}
16
        showsVerticalScrollIndicator={false}
17
      >
18
        {/* Confirmation block */}
19
        <View style={styles.confirmationBlock}>
20
          <View style={styles.outerRing}>
21
            <View style={styles.innerCircle}>
22
              <Ionicons name="checkmark" size={32} color="#fff" />
23
            </View>
24
          </View>
25
          <Text style={styles.confirmTitle}>Consulta Salva!</Text>
26
          <Text style={styles.confirmSubtitle}>
27
            Sua consulta foi registrada com sucesso.
28
          </Text>
29
        </View>
30

31
        {/* Follow-up card */}
32
        <Card style={styles.followUpCard}>
33
          <Text style={styles.followUpTitle}>Algo surgiu na sessão?</Text>
34
          <Text style={styles.followUpSubtitle}>
35
            Aproveite para registrar enquanto está fresco
36
          </Text>
37

38
          <TouchableOpacity
39
            style={styles.optionRow}
40
            activeOpacity={0.7}
41
            onPress={() => router.replace("/triggers/new?category=THERAPY")}
42
          >
43
            <View style={[styles.optionIcon, { backgroundColor: "#ede9fe" }]}>
44
              <Ionicons name="flash-outline" size={22} color="#7c3aed" />
45
            </View>
46
            <View style={styles.optionText}>
47
              <Text style={styles.optionTitle}>Criar um gatilho</Text>
48
              <Text style={styles.optionDesc}>
49
                Registre algo que emergiu na sessão
50
              </Text>
51
            </View>
52
            <Ionicons
53
              name="chevron-forward"
54
              size={18}
55
              color={Colors.light.disabled}
56
            />
57
          </TouchableOpacity>
58

59
          <TouchableOpacity
60
            style={styles.optionRow}
61
            activeOpacity={0.7}
62
            onPress={() => router.replace("/new/entry")}
63
          >
64
            <View style={[styles.optionIcon, { backgroundColor: "#fef9c3" }]}>
65
              <Ionicons name="heart-outline" size={22} color="#ca8a04" />
66
            </View>
67
            <View style={styles.optionText}>
68
              <Text style={styles.optionTitle}>Registrar humor</Text>
69
              <Text style={styles.optionDesc}>
70
                Como você está se sentindo agora?
71
              </Text>
72
            </View>
73
            <Ionicons
74
              name="chevron-forward"
75
              size={18}
76
              color={Colors.light.disabled}
77
            />
78
          </TouchableOpacity>
79
        </Card>
80

81
        {/* Concluir ghost button */}
82
        <Button
83
          title="Concluir"
84
          variant="ghost"
85
          onPress={() => router.replace("/(tabs)/actions")}
86
          style={styles.concludeButton}
87
        />
88
      </ScrollView>
89
    </SafeAreaView>
90
  );
91
}
92

93
const styles = StyleSheet.create({
94
  safe: {
95
    flex: 1,
96
    backgroundColor: Colors.light.background,
97
  },
98
  scrollContent: {
99
    paddingHorizontal: Spacing.containerPadding,
100
    paddingTop: 48,
101
    paddingBottom: 36,
102
  },
103
  confirmationBlock: {
104
    alignItems: "center",
105
    marginBottom: Spacing.sectionGap,
106
    gap: 12,
107
  },
108
  outerRing: {
109
    width: 88,
110
    height: 88,
111
    borderRadius: 44,
112
    backgroundColor: "#E7FDEF",
113
    alignItems: "center",
114
    justifyContent: "center",
115
  },
116
  innerCircle: {
117
    width: 64,
118
    height: 64,
119
    borderRadius: 32,
120
    backgroundColor: Colors.light.tint,
121
    alignItems: "center",
122
    justifyContent: "center",
123
  },
124
  confirmTitle: {
125
    ...Typography.headlineMd,
126
    fontWeight: "700",
127
    color: Colors.light.text,
128
    textAlign: "center",
129
  },
130
  confirmSubtitle: {
131
    ...Typography.bodyMd,
132
    color: Colors.light.textSecondary,
133
    textAlign: "center",
134
  },
135
  followUpCard: {
136
    padding: Spacing.cardGap,
137
    marginBottom: Spacing.sectionGap,
138
    gap: 12,
139
  },
140
  followUpTitle: {
141
    ...Typography.headlineMd,
142
    fontWeight: "700",
143
    color: Colors.light.text,
144
    marginBottom: 2,
145
  },
146
  followUpSubtitle: {
147
    ...Typography.bodyMd,
148
    color: Colors.light.textSecondary,
149
    marginBottom: 8,
150
  },
151
  optionRow: {
152
    flexDirection: "row",
153
    alignItems: "center",
154
    padding: Spacing.cardGap,
155
    backgroundColor: "#fff",
156
    borderRadius: BorderRadius.lg,
157
    borderWidth: 1,
158
    borderColor: Colors.light.divider,
159
    gap: 12,
160
    ...Shadows.sm,
161
  },
162
  optionIcon: {
163
    width: 44,
164
    height: 44,
165
    borderRadius: BorderRadius.md,
166
    alignItems: "center",
167
    justifyContent: "center",
168
  },
169
  optionText: {
170
    flex: 1,
171
    gap: 2,
172
  },
173
  optionTitle: {
174
    ...Typography.bodyMd,
175
    fontWeight: "600",
176
    color: Colors.light.text,
177
  },
178
  optionDesc: {
179
    ...Typography.labelSm,
180
    color: Colors.light.textSecondary,
181
  },
182
  concludeButton: {
183
    marginTop: 8,
184
  },
185
});