import { Ionicons } from "@expo/vector-icons"; import * as Clipboard from "expo-clipboard"; import { router, useLocalSearchParams } from "expo-router"; import { useState } from "react"; import { Alert, Image, Linking, Pressable, ScrollView, Share, View, } from "react-native"; import { Button } from "@/components/ui/Button"; import { AppHeader } from "@/components/ui/Header"; import { Screen } from "@/components/ui/Screen"; import { Text } from "@/components/ui/Text"; import { buildPharmacistOrderShareText } from "@/lib/commerce"; import { routes } from "@/lib/routes"; import { useOrdersStore } from "@/lib/stores/ordersStore"; import { colors, fonts, gutter, radii, shadows } from "@/lib/theme"; import { formatETB, WHATSAPP_NUMBER } from "@/lib/utils"; /** * Screenshot-friendly pharmacist order code card. * Guests copy / share / screenshot this so staff can create the order in admin. */ export default function PharmacistOrderCodeScreen() { const { id } = useLocalSearchParams<{ id: string }>(); const order = useOrdersStore((s) => s.getById(id)); const [copied, setCopied] = useState(false); if (!order?.pickupCode) { return ( No pharmacist order code found for this order.