import type { ReactNode } from "react";
import { Pressable, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { SymbolView, type AppSymbolName } from "./AppSymbol";
import { AppText as Text } from "./AppText";
import { cn } from "../lib/cn";
export interface AndroidHeaderAction {
readonly accessibilityLabel: string;
readonly icon: AppSymbolName;
readonly onPress: () => void;
readonly disabled?: boolean;
}
export function AndroidHeaderIconButton(props: {
readonly accessibilityLabel: string;
readonly icon: AppSymbolName;
readonly onPress?: () => void;
readonly disabled?: boolean;
}) {
return (
);
}
export function AndroidScreenHeader(props: {
readonly title: string;
readonly subtitle?: string | null;
readonly actions?: ReadonlyArray;
readonly trailing?: ReactNode;
readonly onBack?: () => void;
readonly embedded?: boolean;
readonly hideBottomBorder?: boolean;
}) {
const insets = useSafeAreaInsets();
return (
{props.onBack ? (
) : null}
{props.title}
{props.subtitle ? (
{props.subtitle}
) : null}
{props.actions?.map((action) => (
))}
{props.trailing}
);
}
export function AndroidSheetHeader(
props: Omit[0], "embedded">,
) {
return ;
}