// Data JSON yang diberikan


    const dataVoucher = [
        {
            "title"         : "Paket 12 Jam",
            "note"          : "Paket Jaga Unlimited",
            "profile"       : "paket-12-jam",
            "price"         : "10000",
            "selling_price" : "Rp. 10,000",
            "warna"         : "pink"
        },{
            "title"         : "Paket 24 Jam",
            "note"          : "Paket Puas Unlimited",
            "profile"       : "paket-12-jam",
            "price"         : "10000",
            "selling_price" : "Rp. 15,000",
            "warna"         : "green"
        },{
            "title"         : "Paket 30 Hari",
            "note"          : "Paket Power Full Unlimited",
            "profile"       : "paket-12-jam",
            "price"         : "300000",
            "selling_price" : "Rp. 300,000",
            "warna"         : "orange"
        }
    ];
    
// const apidata = [
//   {
//       "id": "-1001819599759", //bdn
//       "note": "PENTING!<br>hal ini akan membuat user Anda akan keluar secara otomatis setelah mengganti password baru, ingat passtikan Anda mengingat password yang baru di buat!",
//       "link": "https://bang-al.my.id/tg_bot/APITEL/pass.php",
//     },
// ];


var color_msg	= "red";
// message text
var message = "<i class='fa fa-info-circle'></i><b> Motivasi...</b><br>Mengenal diri sendiri adalah awal dari semua kebijaksanaan<br><i>by_wifi@Konut";

//info contack
const contack = [
  {
    "name": "Acil",
    "number": "+62 8135 5514 2432",
    "icon": "<i class='fab fa-whatsapp'></i>",
    "info": "All Site",
  },
  {
    "name": "Rusman",
    "number": "+62 821-9776-6176",
    "icon": "<i class='fab fa-whatsapp'></i>",
    "info": "Site Morombo-Langgikima",
  },
];

const sosmed_con = [
  {
      "link": "https://facebook.com/Acil.4cil",
      "icon": "<i class='fab fa-facebook'></i>",
      "color": "facebook",
    },
    {
      "link": "https://twitter.com/",
      "icon": "<i class='fab fa-twitter'></i>",
      "color": "twitter",
    },
    {
      "link": "https://www.instagram.com/acil_109/",
      "icon": "<i class='fab fa-instagram'></i>",
      "color": "instagram",
    },
    {
      "link": "https://youtube.com/",
      "icon": "<i class='fab fa-youtube'></i>",
      "color": "youtube",
    },
  ];
  

function generateHTML(sosmed) {
  return `
  <li>
    <a href=${sosmed.link}>
      <span class="icon-small icon-width socmed-bg-${sosmed.color} color-white">
      ${sosmed.icon}
      </span>
    </a>
  </li>
  `;
  }
  const sosmedListElement = document.getElementById("sosmedList");
  sosmed_con.forEach((sosmed) => {
      const sosmedHTML = generateHTML(sosmed);
      sosmedListElement.innerHTML += sosmedHTML;
  });


function generatePaketHTML(paketData) {
    return `
        <div class="row daftar background-white box-shadow border-radius padding-box-middle">
            <div class="row">
                <div class="col-20">				
                    <span class="icon-big icon-color-${paketData.warna}"><i class="fas fa-donate"></i></span>
                </div>
                <div class="col-50">
                    <h6 class="font-small"> Paket ${paketData.title}<br /><i class="fas fa-bolt"></i> ${paketData.note} <br /><span class="icon-color-green color-primer"> <i class="fas fa-grin-alt"></i> ${paketData.selling_price}</span></h6>
                </div>
                <div class="col-30">
                    <form action="https://wifikonut.bang-al.my.id/buatvoucher.php" method="POST">
                        <input type="hidden" value="${paketData.profile}" name="profile">
                        <input type="hidden" value="${paketData.price}" name="saldo">
                        <input type="hidden" value="3C-A9-F4-56-60-F8" name="mac">
                        <button type="submit" name="kirim" class="btn-daftar buttons box-shadow">Beli Paket</button>
                    </form>
                </div>
            </div>
        </div>
    `;
}
