import React from "react"; import { View, Text, TouchableOpacity, StyleSheet, Platform, } from "react-native"; import { X, MessageSquarePlus, History } from "lucide-react-native"; import type { OperoChatHeaderProps } from "../types"; import { mergeStyles } from "../utils/helpers"; export const OperoChatHeader: React.FC = ({ title = "Opero Assistant", onClose, onNewConversation, onOpenHistory, customStyles, }) => { const styles = createStyles(mergeStyles(customStyles)); return ( {title} {onOpenHistory && ( )} ); }; const createStyles = (theme: any) => StyleSheet.create({ container: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", backgroundColor: theme.primaryColor || "#3b82f6", paddingHorizontal: 20, paddingVertical: 16, paddingTop: Platform.OS === "ios" ? 44 : 16, shadowColor: "#000", shadowOffset: { width: 0, height: 2, }, shadowOpacity: 0.1, shadowRadius: 4, elevation: 4, }, titleContainer: { flex: 1, marginRight: 16, }, title: { fontSize: 18, fontWeight: "600", color: "#ffffff", textAlign: "center", }, buttonContainer: { flexDirection: "row", alignItems: "center", gap: 12, }, actionButton: { width: 32, height: 32, borderRadius: 16, backgroundColor: "rgba(255, 255, 255, 0.2)", alignItems: "center", justifyContent: "center", }, });