<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>API Documentation</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
        }
        h1 {
            color: #333;
        }
        .api-route {
            margin-bottom: 20px;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            background-color: #f9f9f9;
        }
        .api-route h2 {
            margin: 0 0 10px;
            color: #555;
        }
        .api-route p {
            margin: 5px 0;
        }
        .api-route .method {
            font-weight: bold;
            color: #007bff;
        }
        .api-route .endpoint {
            font-weight: bold;
            color: #28a745;
        }
        .api-route .request-body {
            background-color: #fff;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 3px;
            margin-top: 10px;
        }
    </style>
</head>
<body>
    <h1>API Documentation</h1>

    <!-- Book Categories API -->
    <div class="api-route">
        <h2>Book Categories</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/book-categories</span></p>
        <p>Get all book categories.</p>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/book-categories/{id}</span></p>
        <p>Get a specific book category by ID.</p>
    </div>

    <!-- Books API -->
    <div class="api-route">
        <h2>Books</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/books</span></p>
        <p>Get all books.</p>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/books/{id}</span></p>
        <p>Get a specific book by ID.</p>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/books/category/{categoryId}</span></p>
        <p>Get books by category ID.</p>
    </div>

    <!-- Dua Categories API -->
    <div class="api-route">
        <h2>Dua Categories</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/dua-categories</span></p>
        <p>Get all dua categories.</p>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/dua-categories/{id}</span></p>
        <p>Get a specific dua category by ID.</p>
    </div>

    <!-- Duas API -->
    <div class="api-route">
        <h2>Duas</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/duas</span></p>
        <p>Get all duas.</p>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/duas/{id}</span></p>
        <p>Get a specific dua by ID.</p>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/duas/category/{categoryId}</span></p>
        <p>Get duas by category ID.</p>
    </div>

    <!-- Guides API -->
    <div class="api-route">
        <h2>Prayer Guide</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/prayer-guide</span></p>
        <p>Get all Prayer Guide PDFs.</p>
        <div class="request-body">
            <strong>Response:</strong>
            <pre>{
  "success": true,
  "data": [
    {
      "id": 1,
      "title": "Complete Prayer Guide",
      "description": null,
      "pdf_url": "http://your-domain.com/uploads/guides/file.pdf",
      "created_at": "2026-01-14T09:28:08.000000Z"
    }
  ]
}</pre>
        </div>
    </div>

    <div class="api-route">
        <h2>More Zikar</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/more-zikar</span></p>
        <p>Get all More Zikar PDFs.</p>
        <div class="request-body">
            <strong>Response:</strong>
            <pre>{
  "success": true,
  "data": [
    {
      "id": 1,
      "title": "Zikar Collection",
      "description": null,
      "pdf_url": "http://your-domain.com/uploads/guides/file.pdf",
      "created_at": "2026-01-14T09:28:08.000000Z"
    }
  ]
}</pre>
        </div>
    </div>

    <div class="api-route">
        <h2>Hajj & Umrah</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/hajj-umrah</span></p>
        <p>Get all Hajj & Umrah PDFs.</p>
        <div class="request-body">
            <strong>Response:</strong>
            <pre>{
  "success": true,
  "data": [
    {
      "id": 1,
      "title": "Hajj Guide",
      "description": null,
      "pdf_url": "http://your-domain.com/uploads/guides/file.pdf",
      "created_at": "2026-01-14T09:28:08.000000Z"
    }
  ]
}</pre>
        </div>
    </div>

    <!-- Hadith Categories API -->
    <div class="api-route">
        <h2>Hadith Categories</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/hadith-categories</span></p>
        <p>Get all hadith categories.</p>
        <div class="request-body">
            <strong>Response:</strong>
            <pre>{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Sahih Bukhari",
      "description": "Authentic hadiths from Sahih Bukhari",
      "hadiths_count": 15,
      "created_at": "2026-01-19T11:23:55.000000Z"
    }
  ]
}</pre>
        </div>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/hadith-categories/{id}</span></p>
        <p>Get a specific hadith category by ID.</p>
    </div>

    <!-- Hadith API -->
    <div class="api-route">
        <h2>Hadiths</h2>
        <p><span class="method">GET</span> <span class="endpoint">/api/hadiths</span></p>
        <p>Get all hadiths. Optional query parameter: ?category_id=1</p>
        <div class="request-body">
            <strong>Response:</strong>
            <pre>{
  "success": true,
  "data": [
    {
      "id": 1,
      "category": {
        "id": 1,
        "name": "Sahih Bukhari"
      },
      "topic": "Deeds are by intentions",
      "topic_arabic": "إِنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ",
      "narrator": "Umar ibn al-Khattab reported: The Messenger of Allah, peace and blessings be upon him, said:",
      "arabic_text": "إِنَّمَا الْأَعْمَالُ بِالنِّيَّاتِ...",
      "english_translation": "Verily, deeds are only with intentions...",
      "source": "Şahih al-Bukhārī 54",
      "grade": "Muttafaqun Alayhi",
      "created_at": "2026-01-19T11:23:55.000000Z"
    }
  ]
}</pre>
        </div>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/hadiths/{id}</span></p>
        <p>Get a specific hadith by ID.</p>
    </div>

    <div class="api-route">
        <p><span class="method">GET</span> <span class="endpoint">/api/hadiths/category/{categoryId}</span></p>
        <p>Get all hadiths by category ID.</p>
    </div>
</body>
</html>