Ask your question and receive guidance from the universe...
`;
const fortunes = [
"The stars align in your favor today. Expect unexpected blessings!",
"A new opportunity will present itself soon. Stay open to change.",
"Your creative energy is strong. Use it to manifest your dreams.",
"Patience is key right now. Good things come to those who wait.",
"A financial windfall may be coming your way. Be wise with it.",
"Love is in the air! Keep your heart open to new connections.",
"Trust your intuition - it's guiding you in the right direction.",
"A challenge ahead will lead to personal growth. Embrace it.",
"Your hard work is about to pay off. Success is near!",
"The universe is preparing something special for you. Stay positive."
];
const signs = [
"♈ Aries", "♉ Taurus", "♊ Gemini", "♋ Cancer",
"♌ Leo", "♍ Virgo", "♎ Libra", "♏ Scorpio",
"♐ Sagittarius", "♑ Capricorn", "♒ Aquarius", "♓ Pisces"
];
this.shadowRoot.getElementById('get-fortune').addEventListener('click', () => {
const randomFortune = fortunes[Math.floor(Math.random() * fortunes.length)];
const randomSign = signs[Math.floor(Math.random() * signs.length)];
const result = `✨ ${randomSign} ✨\n${randomFortune}`;
this.shadowRoot.getElementById('fortune-result').textContent = result;
});
}
}
customElements.define('fortune-teller', FortuneTeller);