import React from "react";
import {
View,
Modal,
Pressable,
ScrollView,
Dimensions,
StyleSheet,
} from "react-native";
import { Text } from "@/components/ui/text";
import { X, Check } from "@/lib/icons";
import { ShadowWrapper } from "@/components/ShadowWrapper";
import { useColorScheme } from "nativewind";
const { height: SCREEN_HEIGHT } = Dimensions.get("window");
interface PickerModalProps {
visible: boolean;
onClose: () => void;
title: string;
children: React.ReactNode;
}
export function PickerModal({
visible,
onClose,
title,
children,
}: PickerModalProps) {
const { colorScheme } = useColorScheme();
const isDark = colorScheme === "dark";
return (
e.stopPropagation()}
>
{/* Drag Handle */}
{/* Header */}
{title}
{children}
);
}
export function SelectOption({
label,
value,
selected,
onSelect,
}: {
label: string;
value: string;
selected: boolean;
onSelect: (v: string) => void;
}) {
return (
onSelect(value)}
className={`flex-row items-center justify-between p-4 mb-3 rounded-[6px] border ${
selected
? "bg-primary/5 border-primary/20"
: "bg-secondary/20 border-border/5"
}`}
>
{label}
{selected && }
);
}