import type {PropsWithChildren} from "react" import {ActivityIndicator,KeyboardAvoidingView,Platform,Pressable,ScrollView,StyleSheet,Text,TextInput,View,type TextInputProps,type ViewStyle} from "react-native" import {SafeAreaView} from "react-native-safe-area-context" export const colors={background:"#FFFFFF",text:"#1B1B20",muted:"#74747F",layer:"#F5F5F7",action:"#202025",accent:"#6554A5",accentSoft:"#F1EDF9",border:"#EAEAF0",danger:"#C54655"} export function Screen({children}:PropsWithChildren){return {children}} export function Title({children}:PropsWithChildren){return {children}} export function Body({children}:PropsWithChildren){return {children}} export function Panel({children,accent=false,style}:PropsWithChildren<{accent?:boolean;style?:ViewStyle}>){return {children}} export function Button({title,onPress,disabled=false,secondary=false,busy=false}:{title:string;onPress:()=>void;disabled?:boolean;secondary?:boolean;busy?:boolean}){return [styles.button,secondary&&styles.secondary,(disabled||busy||pressed)&&{opacity:0.55}]}>{busy?:{title}}} export function Field({label,...props}:TextInputProps&{label:string}){return {label}} export function ErrorMessage({message}:{message:string}){return message?{message}:null} export function EmptyState({title,detail}: {title:string;detail:string}){return {title}{detail}} export const styles=StyleSheet.create({safe:{flex:1,backgroundColor:colors.background},screen:{padding:24,paddingBottom:40,gap:22,flexGrow:1},title:{fontSize:29,fontWeight:"700",color:colors.text,lineHeight:38},subtitle:{fontSize:19,fontWeight:"600",color:colors.text},body:{fontSize:14,lineHeight:24,color:colors.muted},panel:{backgroundColor:colors.layer,padding:22,borderRadius:18,gap:14},button:{backgroundColor:colors.action,minHeight:50,paddingVertical:13,paddingHorizontal:18,borderRadius:12,alignItems:"center",justifyContent:"center"},secondary:{backgroundColor:colors.layer},buttonText:{fontSize:15,fontWeight:"600",color:"#FFFFFF"},field:{gap:10},label:{fontSize:14,color:colors.text},input:{minHeight:52,borderRadius:12,borderWidth:1,borderColor:colors.border,paddingHorizontal:15,paddingVertical:12,fontSize:16,color:colors.text,backgroundColor:"#FFFFFF"},error:{fontSize:14,color:colors.danger,lineHeight:23},empty:{paddingVertical:35,gap:12},row:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},money:{fontSize:34,fontWeight:"600",color:colors.text},badge:{fontSize:12,color:colors.accent,backgroundColor:colors.accentSoft,paddingHorizontal:10,paddingVertical:6,borderRadius:8,alignSelf:"flex-start"},divider:{height:1,backgroundColor:colors.border}})