summaryrefslogtreecommitdiffstats
path: root/src/app/(protected)/(tabs)/profile/index.tsx
blob: c15db39dc460d2ce59ef8f15149dc4c4c2c94cbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
import { useEffect, useMemo, useState } from 'react';
import theme from '@/theme';
import {ActivityIndicator, Pressable, ScrollView, StyleSheet, Text, TextInput, View,} from 'react-native';
import { Feather } from '@expo/vector-icons';
import { Image } from 'expo-image';
import { useAuthSession } from '@/providers/AuthProvider';
import { useProfile } from '@/features/profile/hooks/useProfile';
import { useUpdateProfile } from '@/features/profile/hooks/useUpdateProfile';
import { useReservations } from '@/features/reservations/hooks/useReservations';
import { router } from 'expo-router';
import { StatusMessage } from '@/shared/ui/StatusMessage';
import { useOffices } from '@/features/offices/hooks/useOffices';
import { useFavoriteOffices } from '@/features/offices/hooks/useFavoriteOffices';

const { colors, spacing, radius, typography, fontWeight, layout, shadows } = theme;

export default function ProfileScreen() {
  // hook de autenticacion
  const { logout } = useAuthSession();

  // hook para cargar datos del perfil
  const { profile, loading, error, reload } = useProfile();

  // hook para actualizar nombre y foto del perfil
  const {
    displayName,
    photoURL,
    setPhotoURL,
    setDisplayName,
    isSubmitting,
    error: updateError,
    successMessage,
    submit,
  } = useUpdateProfile(profile?.displayName ?? '', profile?.photoURL ?? '');

  // hook de favoritos del usuario
  const {
    favoriteOfficeIds,
    isLoadingFavorites,
    favoritesError,
  } = useFavoriteOffices();

  // hook con el listado completo de oficinas
  const {
    offices,
    loading: officesLoading,
    error: officesError,
  } = useOffices();

  // hook de reservas para mostrar actividad del usuario
  const {
    reservations,
    activeReservations,
  } = useReservations();

  // calcula cuantas reservas tienen llegada registrada
  const checkedInReservationsCount = useMemo(() => {
    return reservations.filter((reservation) => reservation.checkInAt).length;
  }, [reservations]);
  
  // cruce entre ids favoritos y lista completa de oficinas
  // para obtener los datos reales de las oficinas favoritas
  const favoriteOffices = useMemo(() => {
    return offices.filter((office) => favoriteOfficeIds.includes(office.id));
  }, [offices, favoriteOfficeIds]);

  // calcula el espacio favorito mas usado entre reservas completadas
  const mostUsedFavoriteOffice = useMemo(() => {
    const completedReservations = reservations.filter(
      (reservation) => reservation.status === 'completed'
    );

    const favoriteReservationCounts = favoriteOffices.map((office) => {
      const usageCount = completedReservations.filter(
        (reservation) => reservation.officeId === office.id
      ).length;

      return {
        office,
        usageCount,
      };
    });

    const sortedFavorites = favoriteReservationCounts.sort(
      (a, b) => b.usageCount - a.usageCount
    );

    if (sortedFavorites.length === 0 || sortedFavorites[0].usageCount === 0) {
      return null;
    }

    return sortedFavorites[0].office;
  }, [reservations, favoriteOffices]);

  // estado local para alternar entre modo vista y modo edicion
  const [isEditing, setIsEditing] = useState(false);

  // sincroniza el formulario con los datos cargados del perfil
  useEffect(() => {
    if (profile?.displayName) {
      setDisplayName(profile.displayName);
    }

    setPhotoURL(profile?.photoURL ?? '');
  }, [profile?.displayName, profile?.photoURL, setDisplayName, setPhotoURL]);

  // cerrar sesion y redirigir a pantalla de bienvenida
  const handleLogout = async () => {
    await logout();
    router.replace('/(auth)/welcome');
  };

  // cambia entre modo vista y modo edicion
  const handleToggleEditing = () => {
    // si se pulsa cancelar, restauramos los valores actuales del perfil
    if (isEditing) {
      setDisplayName(profile?.displayName ?? '');
      setPhotoURL(profile?.photoURL ?? '');
    }

    setIsEditing((current) => !current);
  };

  // guardar cambios del perfil
  const handleSaveProfile = async () => {
    await submit();
    setIsEditing(false);
  };

  // estado de carga inicial del perfil
  if (loading) {
    return (
      <View style={styles.center}>
        <ActivityIndicator size="large" />
      </View>
    );
  }

  // estado de error general del perfil
  if (error || !profile) {
    return (
      <View style={styles.center}>
        <Text style={styles.error}>{error ?? 'No se pudo cargar el perfil'}</Text>

        <Pressable style={styles.button} onPress={reload}>
          <Text style={styles.buttonText}>Reintentar</Text>
        </Pressable>
      </View>
    );
  }

  return (
    <ScrollView
      style={styles.container}
      contentContainerStyle={styles.content}
      showsVerticalScrollIndicator={false}
      >
      {/* cabecera superior visual dentro del scroll */}
      <View style={styles.topBar}>
        <Text style={styles.topBarTitle}>Perfil</Text>
      </View>
      {/* tarjeta cabecera del perfil */}
      {/* avatar, nombre, correo y boton editar / cancelar */}
      <View style={styles.headerCard}>
        <View style={styles.headerRow}>
          {photoURL ? (
            <Image source={{ uri: photoURL }} style={styles.avatar} contentFit="cover" />
          ) : (
            <View style={[styles.avatar, styles.avatarPlaceholder]}>
              <Text style={styles.avatarPlaceholderText}>
                {displayName.trim().charAt(0).toUpperCase() || 'U'}
              </Text>
            </View>
          )}

          <View style={styles.headerInfo}>
            {/* nombre del usuario */}
            <Text style={styles.profileName}>{displayName || 'Usuario'}</Text>

            {/* correo del usuario */}
            <Text style={styles.profileEmail}>{profile.email}</Text>

            {/* boton editar perfil / cancelar */}
            <Pressable style={styles.editButton} onPress={handleToggleEditing}>
              <Text style={styles.editButtonText}>
                {isEditing ? 'Cancelar' : 'Editar perfil'}
              </Text>
            </Pressable>
          </View>
        </View>
      </View>

      {/* seccion sobre mi */}
      {/* solo visual por ahora, FALTA CONEXION CON FIREBASE PARA GUARDAR INFO */}
      <View style={styles.section}>
        <Text style={styles.sectionTitle}>Sobre mí</Text>

        <View style={styles.card}>
          <Text style={styles.aboutText}>
            Espacio personal del usuario para mostrar una breve descripción o
            presentación dentro de la aplicación.
          </Text>
        </View>
      </View>

      {/* seccion informacion personal */}
      {/* en modo vista muestra datos y en modo edicion muestra formulario */}
      <View style={styles.section}>
        <Text style={styles.sectionTitle}>Información personal</Text>

        <View style={styles.card}>
          {isEditing ? (
            <>
              {/* formulario de edicion: nombre */}
              <Text style={styles.label}>Nombre</Text>
              <TextInput
                style={styles.input}
                value={displayName}
                onChangeText={setDisplayName}
                placeholder="Tu nombre"
              />

              {/* formulario de edicion: url de la foto */}
              <Text style={styles.label}>URL de la foto</Text>
              <TextInput
                style={styles.input}
                value={photoURL}
                onChangeText={setPhotoURL}
                placeholder="https://ejemplo.com/foto.jpg"
                autoCapitalize="none"
                autoCorrect={false}
              />

              {/* mensajes de error o exito al guardar */}
              {updateError ? <StatusMessage message={updateError} /> : null}
              {successMessage ? (
                <StatusMessage message={successMessage} tone="success" />
              ) : null}

              {/* boton guardar cambios */}
              <Pressable
                style={styles.button}
                onPress={handleSaveProfile}
                disabled={isSubmitting}
              >
                <Text style={styles.buttonText}>
                  {isSubmitting ? 'Guardando...' : 'Guardar cambios'}
                </Text>
              </Pressable>
            </>
          ) : (
            <>
              {/* fila de nombre completo */}
              <View style={styles.infoRow}>
                <Feather name="user" size={16} color={colors.textSecondary} />
                <View style={styles.infoContent}>
                  <Text style={styles.infoLabel}>Nombre completo</Text>
                  <Text style={styles.infoValue}>{displayName || 'Usuario'}</Text>
                </View>
              </View>

              {/* fila de correo electronico */}
              <View style={styles.infoRow}>
                <Feather name="mail" size={16} color={colors.textSecondary} />
                <View style={styles.infoContent}>
                  <Text style={styles.infoLabel}>Correo electrónico</Text>
                  <Text style={styles.infoValue}>{profile.email}</Text>
                </View>
              </View>

              {/* fila de telefono */}
              {/* por ahora es solo visual, FALTA CONEXION CON FIREBASE */}
              <View style={styles.infoRow}>
                <Feather name="phone" size={16} color={colors.textSecondary} />
                <View style={styles.infoContent}>
                  <Text style={styles.infoLabel}>Teléfono</Text>
                  <Text style={styles.infoValue}>+34 600 123 456</Text>
                </View>
              </View>

              {/* fila de empresa */}
              {/* por ahora es solo visual, FALTA CONEXION CON FIREBASE */}
              <View style={styles.infoRow}>
                <Feather name="briefcase" size={16} color={colors.textSecondary} />
                <View style={styles.infoContent}>
                  <Text style={styles.infoLabel}>Empresa</Text>
                  <Text style={styles.infoValue}>Empresa Innovadora S.L.</Text>
                </View>
              </View>
            </>
          )}
        </View>
      </View>

      {/* seccion actividad */}
      <View style={styles.card}>
        <Text style={styles.sectionTitle}>Resumen de actividad</Text>
        <View style={styles.activityItem}>
          <View style={styles.activityDot} />
          <Text style={styles.activityText}>
            Check in confirmados en {checkedInReservationsCount} reservas.
          </Text>
        </View>

        <View style={styles.activityItem}>
          <View style={styles.activityDot} />
          <Text style={styles.activityText}>
            Actualmente tienes {activeReservations.length} reservas activas.
          </Text>
        </View>

        <View style={styles.activityItem}>
          <View style={styles.activityDot} />
          <Text style={styles.activityText}>
            {mostUsedFavoriteOffice
              ? `Top de favoritos: ${mostUsedFavoriteOffice.name}.`
              : 'Aún no tienes suficiente actividad para destacar un espacio favorito.'}
          </Text>
        </View>
      </View>

      {/* seccion favoritos */}
      <View style={styles.section}>
        <Text style={styles.sectionTitle}>Favoritos</Text>

        <View style={styles.card}>
          {isLoadingFavorites || officesLoading ? (
            <Text style={styles.aboutText}>Cargando favoritos...</Text>
          ) : favoritesError || officesError ? (
            <Text style={styles.errorText}>
              {favoritesError ?? officesError}
            </Text>
          ) : favoriteOffices.length === 0 ? (
            <Text style={styles.aboutText}>
              Todavía no has marcado oficinas como favoritas.
            </Text>
          ) : (
            <>
              {/* cabecera resumida de favoritos */}
              <View style={styles.favoriteSummaryRow}>
                <Text style={styles.favoriteCount}>{favoriteOffices.length}</Text>
                <Text style={styles.favoriteSummaryText}>oficinas guardadas</Text>
              </View>

              {/* lista corta de favoritos, limitada a 3 */}
              <View style={styles.favoritesList}>
                {favoriteOffices.slice(0, 3).map((office) => (
                  <View key={office.id} style={styles.favoriteRow}>
                    <View style={styles.favoriteIconWrap}>
                      <Feather name="star" size={14} color={colors.primary} />
                    </View>

                    <View style={styles.favoriteTextBlock}>
                      <Text style={styles.favoriteItemText}>{office.name}</Text>
                      <Text style={styles.favoriteItemMeta}>Espacio favorito</Text>
                    </View>
                  </View>
                ))}
              </View>

              {/* enlace visual para ver todos los favoritos
                  solo aparece si hay mas de 3 favoritos */}
              {favoriteOffices.length > 3 ? (
                <Pressable style={styles.viewAllButton}>
                  <Text style={styles.viewAllText}>Ver todos</Text>
                </Pressable>
              ) : null}
            </>
          )}
        </View>
      </View>

      {/* seccion cierre de sesion */}
      <View style={styles.logoutSection}>
        <Pressable style={styles.logoutButton} onPress={handleLogout}>
          <Text style={styles.logoutButtonText}>Cerrar sesión</Text>
        </Pressable>
      </View>

      {/* texto inferior de version */}
      <Text style={styles.footerText}>App Oficina v1.0.0</Text>
    </ScrollView>
  );
}

const styles = StyleSheet.create({
  // contenedor principal de la pantalla
  container: {
    flex: 1,
    backgroundColor: colors.background,
  },

  // contenido interno del scroll
  // padding general, separacion entre bloques y el ancho maximo 
  // para mantener consistencia con otras pantallas
  content: {
    padding: spacing.xl,
    paddingTop: spacing.lg,
    gap: spacing.lg,
    maxWidth: layout.contentWidth,
    width: '100%',
    alignSelf: 'center',
    paddingBottom: spacing.xxxl,
  },

  // estado de carga y error general
  center: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    padding: spacing.xxxl,
    gap: spacing.md,
    backgroundColor: colors.background,
  },

  // titulo superior de la pantalla
  topBar: {
    backgroundColor: colors.surface,
    borderBottomWidth: 1,
    borderBottomColor: colors.border,
    paddingHorizontal: spacing.xl,
    paddingTop: spacing.lg,
    paddingBottom: spacing.lg,
    marginHorizontal: -spacing.xl,
    marginTop: -spacing.lg,
  },
  topBarTitle: {
    fontSize: typography.xxl,
    fontWeight: fontWeight.semibold,
    color: colors.text,
    textAlign: 'left',
    maxWidth: layout.contentWidth,
    width: '100%',
    alignSelf: 'center',
    paddingHorizontal: spacing.xl,
  },

  // tarjeta superior de cabecera
  headerCard: {
    backgroundColor: colors.surface,
    borderRadius: radius.xxl,
    padding: spacing.xxl,
    borderWidth: 1,
    borderColor: colors.border,
    ...shadows.card,
  },

  // fila interna de la cabecera
  // coloca avatar a la izquierda y datos a la derecha
  headerRow: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: spacing.xxl,
  },

  // bloque de informacion de la cabecera
  headerInfo: {
    flex: 1,
    gap: spacing.xs,
  },

  // avatar del usuario
  avatar: {
    width: 88,
    height: 88,
    borderRadius: 44,
  },

  // avatar alternativo cuando no hay foto
  avatarPlaceholder: {
    backgroundColor: colors.primary,
    alignItems: 'center',
    justifyContent: 'center',
  },

  // letra dentro del avatar alternativo
  avatarPlaceholderText: {
    color: colors.white,
    fontSize: 34,
    fontWeight: fontWeight.semibold,
  },

  // nombre principal del usuario
  profileName: {
    fontSize: typography.xxxl,
    fontWeight: fontWeight.semibold,
    color: colors.text,
  },

  // correo mostrado en cabecera
  profileEmail: {
    fontSize: typography.xl,
    color: colors.textSecondary,
  },

  // boton pequeno de editar / cancelar
  editButton: {
    marginTop: spacing.xs,
    borderWidth: 1,
    borderColor: colors.primary,
    paddingVertical: spacing.xs,
    paddingHorizontal: spacing.md,
    borderRadius: radius.md,
    alignSelf: 'flex-start',
  },

  // texto del boton editar / cancelar
  editButtonText: {
    color: colors.primary,
    fontSize: typography.sm,
    fontWeight: fontWeight.medium,
  },

  // separacion entre titulo de seccion y tarjeta
  section: {
    gap: spacing.sm,
  },

  // titulo de cada seccion
  sectionTitle: {
    fontSize: typography.xl,
    fontWeight: fontWeight.semibold,
    color: colors.text,
  },

  // tarjeta base reutilizable
  card: {
    backgroundColor: colors.surface,
    borderRadius: radius.xxl,
    padding: spacing.lg,
    borderWidth: 1,
    borderColor: colors.border,
    ...shadows.card,
    gap: spacing.md,
  },

  // fila de informacion personal con icono a la izquierda
  infoRow: {
    flexDirection: 'row',
    alignItems: 'flex-start',
    gap: spacing.md,
  },

  // contenido de texto dentro de cada fila de informacion
  infoContent: {
    flex: 1,
    gap: spacing.xs,
  },

  // etiqueta pequena de informacion personal
  infoLabel: {
    fontSize: typography.sm,
    color: colors.textSecondary,
    fontWeight: fontWeight.regular,
  },

  // valor mostrado en informacion personal
  infoValue: {
    fontSize: typography.md,
    color: colors.text,
    fontWeight: fontWeight.medium,
  },

  // texto general de apoyo
  // usado en sobre mi, favoritos vacios y mensajes similares
  aboutText: {
    fontSize: typography.md,
    color: colors.textSecondary,
    lineHeight: 20,
  },

  // texto de error en secciones concretas
  errorText: {
    fontSize: typography.md,
    color: colors.error,
  },

  // bloque de actividad
  // muestra resumen narrativo del uso de la app
  activityText: {
    fontSize: typography.md,
    color: colors.textSecondary,
    lineHeight: 20,
  },
    // fila individual de actividad
  activityItem: {
    flexDirection: 'row',
    alignItems: 'flex-start',
    gap: spacing.md,
  },
  // punto visual de cada item de actividad
  activityDot: {
    width: 8,
    height: 8,
    borderRadius: 4,
    backgroundColor: colors.primary,
    marginTop: 6,
  },
  // texto de la seccion actividad
  activityText: {
    flex: 1,
    fontSize: typography.md,
    color: colors.textSecondary,
    lineHeight: 20,
  },

  // bloque de favoritos
  // fila resumen de favoritos coloca numero y texto en la misma linea
  favoriteSummaryRow: {
    flexDirection: 'row',
    alignItems: 'baseline',
    gap: spacing.sm,
    marginBottom: spacing.xs,
  },

  // numero grande de favoritos
  favoriteCount: {
    fontSize: typography.xxxl,
    fontWeight: fontWeight.semibold,
    color: colors.text,
  },

  // texto pequeno junto al numero 
  favoriteSummaryText: {
    fontSize: typography.sm,
    color: colors.textSecondary,
  },

  // lista interna de favoritos
  favoritesList: {
    gap: spacing.sm,
    marginTop: spacing.xs,
  },

  // fila individual de favorito
  favoriteRow: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: spacing.md,
    paddingVertical: spacing.sm,
    paddingHorizontal: spacing.sm,
    borderRadius: radius.md,
    backgroundColor: colors.background,
    borderWidth: 1,
    borderColor: colors.border,
  },

  // contenedor del icono del favorito
  favoriteIconWrap: {
    width: 28,
    height: 28,
    borderRadius: 14,
    backgroundColor: colors.primarySoft,
    alignItems: 'center',
    justifyContent: 'center',
  },

  // bloque de texto del favorito
  favoriteTextBlock: {
    flex: 1,
    gap: 2,
  },

  // texto del nombre de la oficina favorita
  favoriteItemText: {
    fontSize: typography.md,
    color: colors.text,
    fontWeight: fontWeight.medium,
  },

  // texto secundario pequeno del favorito
  favoriteItemMeta: {
    fontSize: typography.sm,
    color: colors.textSecondary,
  },

    // boton / enlace visual para ver todos los favoritos
  viewAllButton: {
    marginTop: spacing.xs,
    alignSelf: 'flex-start',
  },

  // texto del enlace ver todos
  viewAllText: {
    fontSize: typography.sm,
    color: colors.primary,
    fontWeight: fontWeight.medium,
  },

  // formulario de edicion
  // etiqueta de cada input
  label: {
    fontSize: typography.md,
    fontWeight: fontWeight.semibold,
    color: colors.text,
  },

  // input de texto para campos editables
  input: {
    borderWidth: 1,
    borderColor: colors.border,
    borderRadius: radius.md,
    paddingHorizontal: spacing.lg,
    paddingVertical: spacing.md,
    backgroundColor: colors.surface,
  },

  // boton principal de guardar cambios
  button: {
    backgroundColor: colors.primary,
    paddingVertical: spacing.lg,
    borderRadius: radius.md,
    alignItems: 'center',
    marginTop: spacing.sm,
  },

  // texto del boton principal
  buttonText: {
    color: colors.white,
    fontWeight: fontWeight.semibold,
  },

  // separacion antes del bloque de cierre de sesion
  logoutSection: {
    marginTop: spacing.lg,
  },

  // boton de cerrar sesion
  logoutButton: {
    borderWidth: 1,
    borderColor: '#f3b4b4',
    backgroundColor: colors.surface,
    paddingVertical: spacing.md,
    borderRadius: radius.md,
    alignItems: 'center',
    marginTop: spacing.sm,
  },

  // texto del boton cerrar sesion
  logoutButtonText: {
    color: colors.error,
    fontWeight: fontWeight.regular,
  },
  // contenido interno del boton cerrar sesion
  // alinea icono y texto en horizontal
  logoutContent: {
    flexDirection: 'row',
    alignItems: 'center',
    gap: spacing.sm,
  },

  // texto inferior de version
  footerText: {
    textAlign: 'center',
    color: colors.muted,
    fontSize: typography.sm,
    marginTop: spacing.sm,
  },

  // error general de pantalla
  error: {
    color: colors.error,
    textAlign: 'center',
  },
});