/* Add custom Js code below */
const feats = document.querySelector('section.s-block.s-block--features.container')
const contact = document.createElement('section')
contact.innerHTML = `

`
function showProductPageDetails() {
var faqsDiv = document.createElement("div");
faqsDiv.className = "description-div product-accordion";
var brandsList = document.createElement("div");
var packet = document.createElement("div");
setTimeout(() => {
const proName = document.querySelector('.product-single h1.text-xl').textContent
console.log('start', proName)
if (proName.includes("قلادة")) {
packet.innerHTML = '

';
brandsList.appendChild(packet)
} else if (proName.includes("خاتم")){
packet.innerHTML = '

';
brandsList.appendChild(packet)
}
}, 2000);
faqsDiv.appendChild(brandsList);
if (productPage) {
productPage.after(faqsDiv)
faqsDiv.after(productBanner);
}
}
const myfunc=()=> {
const accordionBtns=document.querySelectorAll(".accordion");
if (accordionBtns) {
accordionBtns.forEach((accordion)=> {
if (accordion) {
accordion.onclick=function () {
// accordion.addEventListener('click', function () {
this.classList.toggle("is-open");
let content=this.nextElementSibling;
if (content.style.maxHeight) {
content.style.maxHeight=null;
}
else {
content.style.maxHeight = 'max-content';
}
// })
}
;
}
});
}
}
;
const interval=setInterval(()=> {
myfunc();
}
, 2000);
document.addEventListener("DOMContentLoaded", ()=> {
const product=document.querySelector('.product-single');
if(product) {
showProductPageDetails();
}
})