import type { SheetProps, ViewProps } from "tamagui"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { ScrollView, Separator, Sheet, Spinner, styled, Text, View, } from "tamagui"; const PlayerText = styled(Text, { color: "$playerSettingsUnactiveText", fontWeight: "bold", fontSize: 18, }); function SettingsSheet(props: SheetProps) { return ( {props.children} ); } function SettingsSheetOverlay() { return ( ); } function SettingsSheetHandle() { return ; } function SettingsSheetFrame({ children, isLoading, }: { children: React.ReactNode; isLoading?: boolean; }) { return ( {isLoading && ( )} {!isLoading && children} ); } function SettingsHeader({ icon, title, rightButton, }: { icon: React.ReactNode; title: string; rightButton?: React.ReactNode; }) { const insets = useSafeAreaInsets(); return ( <> {icon} {title} {rightButton} ); } function SettingsContent({ isScroll = true, children, }: { isScroll?: boolean; children: React.ReactNode; }) { const ViewDisplay = isScroll ? ScrollView : View; const insets = useSafeAreaInsets(); return ( {children} ); } function SettingsItem({ iconLeft, iconRight, title, ...props }: ViewProps & { iconLeft?: React.ReactNode; iconRight?: React.ReactNode; title: string; }) { return ( {iconLeft} {title} {iconRight} ); } export const Settings = { Sheet: SettingsSheet, SheetOverlay: SettingsSheetOverlay, SheetHandle: SettingsSheetHandle, SheetFrame: SettingsSheetFrame, Header: SettingsHeader, Content: SettingsContent, Text: PlayerText, Item: SettingsItem, };