from fastapi import APIRouter

from app.api.v1 import (
    appointments,
    audit,
    branches,
    clinic_management,
    clinics,
    configurations,
    delivery_integration,
    departments,
    doctor_panel,
    doctors,
    external_providers,
    medical_records,
    patient_portal,
    patients,
    permissions,
    pharmacy,
    settings,
)

api_router = APIRouter()
api_router.include_router(clinics.router, prefix="/clinics", tags=["clinics"])
api_router.include_router(branches.router, prefix="/branches", tags=["branches"])
api_router.include_router(departments.router, prefix="/departments", tags=["departments"])
api_router.include_router(doctors.router, prefix="/doctors", tags=["doctors"])
api_router.include_router(patients.router, prefix="/patients", tags=["patients"])
api_router.include_router(
    appointments.schedules_router, prefix="/schedules", tags=["schedules"]
)
api_router.include_router(
    appointments.availability_router, prefix="/availability-windows", tags=["availability"]
)
api_router.include_router(
    appointments.appointment_types_router, prefix="/appointment-types", tags=["appointment-types"]
)
api_router.include_router(
    appointments.appointments_router, prefix="/appointments", tags=["appointments"]
)
api_router.include_router(
    appointments.waiting_list_router, prefix="/waiting-list", tags=["waiting-list"]
)
api_router.include_router(
    doctor_panel.doctor_panel_router, prefix="/doctor-panel", tags=["doctor-panel"]
)
api_router.include_router(
    doctor_panel.visit_sessions_router, prefix="/visit-sessions", tags=["visit-sessions"]
)
api_router.include_router(
    doctor_panel.visit_notes_router, prefix="/visit-notes", tags=["visit-notes"]
)
api_router.include_router(
    clinic_management.services_router, prefix="/clinic-services", tags=["clinic-services"]
)
api_router.include_router(
    clinic_management.staff_router, prefix="/staff-assignments", tags=["staff-assignments"]
)
api_router.include_router(
    clinic_management.policies_router, prefix="/clinic-policies", tags=["clinic-policies"]
)
api_router.include_router(
    clinic_management.hours_router, prefix="/operating-hours-policies", tags=["operating-hours"]
)
api_router.include_router(
    patient_portal.router, prefix="/patient-portal", tags=["patient-portal"]
)
api_router.include_router(
    medical_records.records_router, prefix="/medical-records", tags=["medical-records"]
)
api_router.include_router(
    medical_records.encounters_router, prefix="/encounters", tags=["encounters"]
)
api_router.include_router(pharmacy.pharmacies_router, prefix="/pharmacies", tags=["pharmacies"])
api_router.include_router(
    pharmacy.prescription_orders_router, prefix="/prescription-orders", tags=["prescription-orders"]
)
api_router.include_router(
    delivery_integration.integrations_router,
    prefix="/delivery-integrations",
    tags=["delivery-integrations"],
)
api_router.include_router(
    delivery_integration.intents_router, prefix="/delivery-job-intents", tags=["delivery-job-intents"]
)
api_router.include_router(
    delivery_integration.webhooks_router, prefix="/webhooks", tags=["webhooks"]
)
api_router.include_router(
    external_providers.router,
    prefix="/external-providers",
    tags=["external-providers"],
)
api_router.include_router(
    configurations.router, prefix="/configurations", tags=["configurations"]
)
api_router.include_router(settings.router, prefix="/settings", tags=["settings"])
api_router.include_router(audit.router, prefix="/audit", tags=["audit"])
api_router.include_router(
    permissions.router, prefix="/permissions", tags=["permissions"]
)
