<div class="accordion" id="accordionExample">
  <div class="accordion-item">
    <h2 class="accordion-header" id="headingOne">
      <button class="accordion-button  p-2  " type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
        Pages
      </button>
    </h2>
    <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
      <div class="accordion-body p-2">
        <div style="max-height: 300px;overflow-x: hidden;overflow-y: auto;">
          <ul class="list-group">
            <?php
            $menuItems = [
                "প্রচ্ছদ"       => $site_domain,
                "আর্কাইভ"       => $site_domain . "/archive/",
                "ফটো গ্যালারি"       => $site_domain . "/photos/",
                "ভিডিও"       => $site_domain . "/videos/",
                "ওয়েব স্টোরি"       => $site_domain . "/photo-stories/",
                "আমাদের পরিবার" => $site_domain . "/reporters/",
                "কনভার্টার"    => $site_domain . "/bangla-converter/",
                "লগইন"         => $site_domain . "/login/",
                "নিবন্ধন"       => $site_domain . "/register/",
                "অনলাইন জরিপ"  => $site_domain . "/opinion-poll/"
            ];
            foreach ($menuItems as $mtitle => $mlink) {
              ?>
              <div>
                <li class="p-1 mb-1 me-2 border ">
                  <a><?php echo $mtitle; ?></a>
                  <span class="float-end">
                    <a href="javascript:void(0)" class="addValueToMenu"
                       data-url="<?php echo $mlink; ?>"
                       data-text="<?php echo $mtitle; ?>">Add</a>
                  </span>
                </li>
              </div>
              <?php
            }
            $data_page = showAllttdata("tt_page", "WHERE page_status ='published'");
            // Display the retrieved data
            if (!empty($data_page)) {
                foreach ($data_page as $this_page) {
                        $page_title = $this_page['page_title'];
                  ?>
                  <div>
                    <li class="p-1 mb-1 me-2 border ">
                      <a>  <?php echo $page_title ?></a>
                      <span class="float-end">
                        <a href="javascript:void(0)" class="addValueToMenu" data-url="<?php echo $site_domain.$this_page['page_url'] ?>/" data-text="<?php echo $page_title ?>">Add</a>
                      </span>
                    </li>
                   </div>
                  <?php
                }
            }
           ?>
          </ul>
        </div>
      </div>
    </div>
  </div>

  <div class="accordion-item">
    <h2 class="accordion-header" id="heading3">
      <button class="accordion-button  p-2  " type="button" data-bs-toggle="collapse" data-bs-target="#collapse3" aria-expanded="false" aria-controls="collapse3">
        Category List
      </button>
    </h2>
    <div id="collapse3" class="accordion-collapse collapse show" aria-labelledby="heading3" data-bs-parent="#accordionExample">
      <div class="accordion-body p-2">
        <div style="max-height: 300px;overflow-x: hidden;overflow-y: auto;">
          <ul class="list-group">
            <?php
            $data_pro = showAllttdata("mahamudfutureit_category", "WHERE CategorySataus ='Published'");
            // Display the retrieved data
            if (!empty($data_pro)) {
                foreach ($data_pro as $this_pro) {
                  ?>
                  <div>
                    <li class="p-1 mb-1 me-2 border ">
                      <a>  <?php echo $this_pro['CategoryName']  ?></a>
                      <span class="float-end">
                        <a href="javascript:void(0)" class="addValueToMenu" data-url="<?php echo $site_domain.$this_pro['CategoryURL'] ?>/" data-text="<?php echo $this_pro['CategoryName'] ?>">Add</a>
                      </span>
                    </li>
                   </div>
                  <?php
                }
            } else {
                 ?>
                 <p class="text-center border"> No Page Found ! </p>
                 <?php
            }
           ?>
          </ul>
        </div>
      </div>
    </div>
  </div>

  <div class="accordion-item">
    <h2 class="accordion-header" id="headingTwo">
      <button class="accordion-button  p-2   collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
        Custom Links
      </button>
    </h2>
    <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample">
      <div class="accordion-body p-2">
        <input id="MenuUrl" class="form-control form-control-sm mb-2" type="url" name="" value="" placeholder="URL">
        <input id="MenuText" class="form-control form-control-sm" type="text" name="" value="" placeholder="URL Text">
        <div class="text-center">
          <button id="addToMenuButton" type="button" class="  btn  btn-sm btn-outline-success  mt-2">Add to Menu</button>
        </div>
      </div>
    </div>
  </div>
</div>
