function addItem() {
  itemQuestions[0].style.display = "block";
  itemQuestions[6].style.display = "block";

  if (count == 0) {
    let nextBtn = document.getElementById("next");
    let itemaddedBtn = document.getElementById("itemAddedBtn");
    nextBtn.disabled = false;
    itemaddedBtn.disabled = true;
  }
  //count = 0;
  // let nextBtn = document.getElementById("next");
  // let itemaddedBtn = document.getElementById("itemAddedBtn");
  // let firstTime = true;
  // //count = 0;
  // if (count == 0) {
  //   itemQuestions[0].style.display = "block";
  //   itemQuestions[6].style.display = "block";
  //   //You may also show input for the banlist name!
  //   nextBtn.disabled = false;
  //   itemaddedBtn.disabled = true;
  // }
  // // count++;
  // nextBtn.addEventListener("click", () => {
  //   count++;
  //   console.log(count);
  //   if (count == 1) {
  //     // Process First Question (Whitelist)
  //     whiteListCheck = document.querySelector(".form-check-input").checked;
  //     var banlistName = document.getElementById("nameBL").value;
  //     //console.log("The name is: " + banlistName);
  //     // whiteListCheck = document.getElementById("whiteListCheckBox");
  //     if (firstTime) {
  //       banlistText = "!" + banlistName + "\n";
  //     }
  //     if (whiteListCheck && firstTime) {
  //       banlistText += "$whitelist" + "\n";
  //       //alert("Its a whitelist!");
  //     } else if (!whiteListCheck) {
  //       banlistText;
  //       //alert("It's not whitelist");
  //       //@IGNORE don't add whitelist to text blob.
  //     }
  //     console.log(banlistText);
  //     itemQuestions[1].style.display = "block"; //limitation
  //     itemQuestions[4].style.display = "block"; //decksize box..
  //     firstTime = false;
  //   }
  //   if (count == 2) {
  //     //Check limitation type.
  //     whiteListCheck = document.querySelector(
  //       ".form-check-input"
  //     ).disabled = true;
  //     banlistName = document.getElementById("nameBL").disabled = true;
  //     //whiteListCheck = false;
  //     selectLimitation = document.getElementById("limitation");
  //     valueLimitation =
  //       selectLimitation.options[selectLimitation.selectedIndex].value;
  //     if (valueLimitation == "+") {
  //       //banlistText += valueLimitation;
  //       // alert("You choose a requirment.");
  //     } else if (valueLimitation == "limitation") {
  //       banlistText;
  //       //TODO don't add + to the text blob.
  //     }
  //     selectDeckLimit = document.querySelector(".size-check-input").checked;
  //     if (selectDeckLimit) {
  //       console.log("DeckLimit Checked!");
  //       itemQuestions[5].style.display = "block";
  //       /*1.Show Deck Limit Input
  //               2. Don't show the card group question! (should be done in the else statement)
  //               */
  //     } else {
  //       //IF TeckBox.. then show card group.. etc.. if not show location directly.. (jump to count 4)
  //       itemQuestions[2].style.display = "block";
  //     }
  //     //console.log(banlistText);
  //   }
  //   if (count == 3) {
  //     console.log(valueLimitation);
  //     selectCardGroup = document.getElementById("card-group");
  //     valueCardGroup =
  //       selectCardGroup.options[selectCardGroup.selectedIndex].value;
  //     if (valueCardGroup == "individ") {
  //       var cardSearcher = document.getElementById("searchCardView");
  //       var divCardCount = document.getElementById("noLimitDiv");
  //       var cardLimit = document.getElementById("noLimit").value.toString();
  //       divCardCount.style.display = "block";
  //       const _myRequest = new Request(
  //         "https://db.ygoprodeck.com/api/v7/cardinfo.php"
  //       );
  //       fetch(_myRequest)
  //         .then((response) => response.json())
  //         .then(({ data }) => {
  //           users = data.map((user) => {
  //             const card = userCardTemplate.content.cloneNode(true).children[0];
  //             const header = card.querySelector("[data-header]");
  //             const body = card.querySelector("[data-body]");
  //             let no = card.querySelector("[data-no]");
  //             /*CODE For Showing Images Has Been Disabled To Later Polishing~!*/
  //             /*   let imgUrlTmplt =
  //                  "https://storage.googleapis.com/ygoprodeck.com/pics_artgame/";*/
  //             no.textContent = user.id;
  //             header.textContent = user.name;
  //             //   let imageElement = document.createElement("img");
  //             //   imageElement.setAttribute("id", "card-thumb");
  //             body.textContent = "";
  //             //var imgSrc = imgUrlTmplt + user.id.toString() + ".jpg";
  //             // imageElement.src = imgSrc;
  //             //body.appendChild(imageElement);
  //             userCardContainer.append(card);
  //             // console.log(user.id);
  //             card.addEventListener("click", function (event) {
  //               event.preventDefault();
  //               let idConverted = no.textContent.toString();
  //               let searchField = (document.getElementById(
  //                 "search-field"
  //               ).value = idConverted);
  //               _cardView.style.display = "none";
  //               flagType = idConverted;
  //               console.log(flagType);
  //               // banlistText += valueLimitation + idConverted; //with number of limitation/requirment (1, 2, 3)
  //               console.log(banlistText);
  //             });
  //             return { name: user.name, type: user.type, element: card };
  //           });
  //         });
  //       cardSearcher.style = "block";
  //       //TODO Add Dropdowns for filters ASAP!
  //     } else if (valueCardGroup == "ctype") {
  //       itemQuestions[7].style.display = "block";
  //       //  banlistText += valueLimitation + "@type " + cTypeSelection;
  //     } else if (valueCardGroup == "attr") {
  //       itemQuestions[10].style.display = "block";
  //     } else if (valueCardGroup == "category") {
  //       itemQuestions[11].style.display = "block";
  //     } else if (valueCardGroup == "mArch") {
  //       itemQuestions[8].style.display = "block";
  //     }
  //     itemQuestions[3].style.display = "block"; //it should be the location!
  //   }
  //   if (count == 4) {
  //     console.log(banlistText);
  //     selectCardGroup = document.getElementById("card-group");
  //     valueCardGroup =
  //       selectCardGroup.options[selectCardGroup.selectedIndex].value;
  //     if (valueCardGroup == "ctype") {
  //       itemQuestions[7].style.display = "block";
  //     } else if (valueCardGroup == "attr") {
  //       itemQuestions[10].style.display = "block";
  //     } else if (valueCardGroup == "category") {
  //       itemQuestions[11].style.display = "block";
  //     } else if (valueCardGroup == "mArch") {
  //       itemQuestions[8].style.display = "block";
  //     }
  //     var cardLimit = document.getElementById("noLimit").value.toString();
  //     selectCardLocation = document.getElementById("card-location");
  //     valueCardLocation =
  //       selectCardLocation.options[selectCardLocation.selectedIndex].value;
  //     banlistText += " " + cardLimit;
  //     itemaddedBtn.disabled = false;
  //     nextBtn.disabled = true;
  //     //console.log(banlistText);
  //   }
  // });
}
//AddItemBtn: When you click it a questionaire will appear
When you click it a questionaire will appear
When you click it a questionaire will appear
function addItem() {
  itemQuestions[0].style.display = "block";
  itemQuestions[6].style.display = "block";
  if (count == 0) {
    let nextBtn = document.getElementById("next");
    let itemaddedBtn = document.getElementById("itemAddedBtn");
    nextBtn.disabled = false;
    itemaddedBtn.disabled = true;
  }
  // 
   else if (!whiteListCheck) {
   else if (valueLimitation == "limitation") {
   else {
   else if (valueCardGroup == "ctype") {
   else if (valueCardGroup == "attr") {
   else if (valueCardGroup == "category") {
   else if (valueCardGroup == "mArch") {
   else if (valueCardGroup == "attr") {
   else if (valueCardGroup == "category") {
   else if (valueCardGroup == "mArch") {
  );
}
function addItem ( ) { itemQuestions [ 0 ] . style . display = "block" ; itemQuestions [ 6 ] . style . display = "block" ; if ( count == 0 ) { let nextBtn = document . getElementById ( "next" ) ; let itemaddedBtn = document . getElementById ( "itemAddedBtn" ) ; nextBtn . disabled = false ; itemaddedBtn . disabled = true ; } }
AddItemBtn: When you click it a questionaire will appear
AddItemBtn : When you click it a questionaire will appear
//count = 0; // let nextBtn = document.getElementById("next"); // let itemaddedBtn = document.getElementById("itemAddedBtn"); // let firstTime = true; // //count = 0; // if (count == 0) { //   itemQuestions[0].style.display = "block"; //   itemQuestions[6].style.display = "block"; //   //You may also show input for the banlist name! //   nextBtn.disabled = false; //   itemaddedBtn.disabled = true; // } // // count++; // nextBtn.addEventListener("click", () => { //   count++; //   console.log(count); //   if (count == 1) { //     // Process First Question (Whitelist) //     whiteListCheck = document.querySelector(".form-check-input").checked; //     var banlistName = document.getElementById("nameBL").value; //     //console.log("The name is: " + banlistName); //     // whiteListCheck = document.getElementById("whiteListCheckBox"); //     if (firstTime) { //       banlistText = "!" + banlistName + "\n"; //     } //     if (whiteListCheck && firstTime) { //       banlistText += "$whitelist" + "\n"; //       //alert("Its a whitelist!"); //     } else if (!whiteListCheck) { //       banlistText; //       //alert("It's not whitelist"); //       //@IGNORE don't add whitelist to text blob. //     } //     console.log(banlistText); //     itemQuestions[1].style.display = "block"; //limitation //     itemQuestions[4].style.display = "block"; //decksize box.. //     firstTime = false; //   } //   if (count == 2) { //     //Check limitation type. //     whiteListCheck = document.querySelector( //       ".form-check-input" //     ).disabled = true; //     banlistName = document.getElementById("nameBL").disabled = true; //     //whiteListCheck = false; //     selectLimitation = document.getElementById("limitation"); //     valueLimitation = //       selectLimitation.options[selectLimitation.selectedIndex].value; //     if (valueLimitation == "+") { //       //banlistText += valueLimitation; //       // alert("You choose a requirment."); //     } else if (valueLimitation == "limitation") { //       banlistText; //       //TODO don't add + to the text blob. //     } //     selectDeckLimit = document.querySelector(".size-check-input").checked; //     if (selectDeckLimit) { //       console.log("DeckLimit Checked!"); //       itemQuestions[5].style.display = "block"; //       /*1.Show Deck Limit Input //               2. Don't show the card group question! (should be done in the else statement) //               */ //     } else { //       //IF TeckBox.. then show card group.. etc.. if not show location directly.. (jump to count 4) //       itemQuestions[2].style.display = "block"; //     } //     //console.log(banlistText); //   } //   if (count == 3) { //     console.log(valueLimitation); //     selectCardGroup = document.getElementById("card-group"); //     valueCardGroup = //       selectCardGroup.options[selectCardGroup.selectedIndex].value; //     if (valueCardGroup == "individ") { //       var cardSearcher = document.getElementById("searchCardView"); //       var divCardCount = document.getElementById("noLimitDiv"); //       var cardLimit = document.getElementById("noLimit").value.toString(); //       divCardCount.style.display = "block"; //       const _myRequest = new Request( //         "https://db.ygoprodeck.com/api/v7/cardinfo.php" //       ); //       fetch(_myRequest) //         .then((response) => response.json()) //         .then(({ data }) => { //           users = data.map((user) => { //             const card = userCardTemplate.content.cloneNode(true).children[0]; //             const header = card.querySelector("[data-header]"); //             const body = card.querySelector("[data-body]"); //             let no = card.querySelector("[data-no]"); //             /*CODE For Showing Images Has Been Disabled To Later Polishing~!*/ //             /*   let imgUrlTmplt = //                  "https://storage.googleapis.com/ygoprodeck.com/pics_artgame/";*/ //             no.textContent = user.id; //             header.textContent = user.name; //             //   let imageElement = document.createElement("img"); //             //   imageElement.setAttribute("id", "card-thumb"); //             body.textContent = ""; //             //var imgSrc = imgUrlTmplt + user.id.toString() + ".jpg"; //             // imageElement.src = imgSrc; //             //body.appendChild(imageElement); //             userCardContainer.append(card); //             // console.log(user.id); //             card.addEventListener("click", function (event) { //               event.preventDefault(); //               let idConverted = no.textContent.toString(); //               let searchField = (document.getElementById( //                 "search-field" //               ).value = idConverted); //               _cardView.style.display = "none"; //               flagType = idConverted; //               console.log(flagType); //               // banlistText += valueLimitation + idConverted; //with number of limitation/requirment (1, 2, 3) //               console.log(banlistText); //             }); //             return { name: user.name, type: user.type, element: card }; //           }); //         }); //       cardSearcher.style = "block"; //       //TODO Add Dropdowns for filters ASAP! //     } else if (valueCardGroup == "ctype") { //       itemQuestions[7].style.display = "block"; //       //  banlistText += valueLimitation + "@type " + cTypeSelection; //     } else if (valueCardGroup == "attr") { //       itemQuestions[10].style.display = "block"; //     } else if (valueCardGroup == "category") { //       itemQuestions[11].style.display = "block"; //     } else if (valueCardGroup == "mArch") { //       itemQuestions[8].style.display = "block"; //     } //     itemQuestions[3].style.display = "block"; //it should be the location! //   } //   if (count == 4) { //     console.log(banlistText); //     selectCardGroup = document.getElementById("card-group"); //     valueCardGroup = //       selectCardGroup.options[selectCardGroup.selectedIndex].value; //     if (valueCardGroup == "ctype") { //       itemQuestions[7].style.display = "block"; //     } else if (valueCardGroup == "attr") { //       itemQuestions[10].style.display = "block"; //     } else if (valueCardGroup == "category") { //       itemQuestions[11].style.display = "block"; //     } else if (valueCardGroup == "mArch") { //       itemQuestions[8].style.display = "block"; //     } //     var cardLimit = document.getElementById("noLimit").value.toString(); //     selectCardLocation = document.getElementById("card-location"); //     valueCardLocation = //       selectCardLocation.options[selectCardLocation.selectedIndex].value; //     banlistText += " " + cardLimit; //     itemaddedBtn.disabled = false; //     nextBtn.disabled = true; //     //console.log(banlistText); //   } // });