import React, { useState, useEffect } from 'react'; import { initializeApp } from 'firebase/app'; import { getAuth, signInAnonymously, onAuthStateChanged, signInWithCustomToken } from 'firebase/auth'; import { getFirestore, collection, doc, setDoc, getDoc, onSnapshot, query, addDoc, updateDoc, deleteDoc, arrayUnion } from 'firebase/firestore'; import { Plus, Users, ClipboardList, Activity, TestTube, Image as ImageIcon, Search, ChevronRight, Save, Trash2, ArrowRight, UserPlus, Clock, FileText, Menu, X, LogOut, Camera, Ruler, Weight, Stethoscope, ListChecks, Lock, Key, ShieldCheck, FileDown, Eye } from 'lucide-react'; // --- إعدادات النظام السحابي --- const firebaseConfig = JSON.parse(__firebase_config); const app = initializeApp(firebaseConfig); const auth = getAuth(app); const db = getFirestore(app); const appId = typeof __app_id !== 'undefined' ? __app_id : 'hostinger-med-app'; // --- مكونات واجهة المستخدم --- const Card = ({ children, className = "" }) => (
{children}
); const Input = ({ label, ...props }) => (
{label && }
); const Select = ({ label, options, ...props }) => (
{label && }
); const TextArea = ({ label, ...props }) => (
{label && }