Naše české omega-3

// databáze přípravků const itemsDB = { vitC_250: { name: 'Celaskon 250 mg', desc: 'Akutní vitamín C pro náročné situace' }, vitC_100: { name: 'Celaskon 100 mg (děti 3–7 let)', desc: 'Akutní vitamín C pro děti' }, zinc_nup: { name: 'Bioaktivní Zinek Nupreme', desc: 'Akutní zinek pro imunitu a regeneraci' }, teaTree: { name: 'Tea tree olej', desc: 'Štípance, mykózy a opary' }, dragon: { name: 'Dračí krev', desc: 'Rány, puchýře, ošklivé štípance' }, charcoal: { name: 'Aktivní uhlí', desc: 'Běžný průjem, nadýmání, žáha' }, influ: { name: 'InfluZinek / Strep Herbal', desc: 'Aktivace imunity přímo v krku' }, enterol: { name: 'Enterol', desc: 'Silnější průjem, i preventivně' }, imodium: { name: 'Imodium', desc: 'Průjem ze stresu / záchranná brzda' }, tussirex: { name: 'Tussirex pastilky', desc: 'Chrání dýchací cesty před viry' }, strepHerbal: { name: 'Lišejníkové pastilky', desc: 'Podpora krčních sliznic' }, auris: { name: 'Aurisclean', desc: 'Preventivní dezinfekce' }, lichoKap: { name: 'Lichořeřišnice kapky', desc: 'Přírodní antibiotikum' }, pinio: { name: 'Pinio Nasal', desc: 'Léčí všechny druhy rýmy' }, samahan: { name: 'Samahan', desc: 'Přírodní Coldrex' }, panthen: { name: 'Panthenol pěna / mléko', desc: 'Hojí spáleniny' }, pycno: { name: 'Pycnogenol', desc: 'Chrání kůži před sluneční alergií / pigmentovými skvrnami' }, trauma: { name: 'Traumaplant', desc: 'Hojí úrazy, pohmožděniny' }, coccul: { name: 'Cocculine', desc: 'Rozpustí cestovní nevolnost' }, travelPop: { name: 'TravelPop', desc: 'Pomoc při cestovní nevolnosti' }, melat: { name: 'Melatonin', desc: 'Spolehlivá pomoc pro usnutí' }, rescue: { name: 'Rescue pastilky', desc: 'Při strachu a úzkosti' } }; function Wizard() { const { useState, useMemo } = React; const [step, setStep] = useState(0); const [ans, setAns] = useState({ dest: '', kidsAges: [], concerns: [] }); // sestavení doporučených položek const items = useMemo(() => { const s = new Set(); // základní vždy ['teaTree', 'dragon', 'charcoal', 'influ', 'zinc_nup'].forEach(x => s.add(x)); // vitamín C podle věku if (ans.kidsAges.includes('3-7')) s.add('vitC_100'); if (ans.kidsAges.includes('8-14') || ans.kidsAges.includes('none')) s.add('vitC_250'); // destinace if (ans.dest === 'sea') { s.add('enterol'); s.add('imodium'); } if (ans.dest === 'mountains') { s.add('enterol'); } if (ans.dest === 'city') { s.add('enterol'); } if (ans.dest === 'exotic') { s.add('enterol'); s.add('imodium'); } // obavy if (ans.concerns.includes('diarrhoea')) s.add('enterol'); if (ans.concerns.includes('bites')) s.add('strepHerbal'); if (ans.concerns.includes('angina')) s.add('tussirex'); if (ans.concerns.includes('ear')) s.add('auris'), s.add('lichoKap'); if (ans.concerns.includes('uti')) s.add('lichoKap'); if (ans.concerns.includes('resp')) s.add('pinio'), s.add('tussirex'), s.add('samahan'); if (ans.concerns.includes('sun')) s.add('panthen'), s.add('pycno'); if (ans.concerns.includes('injury')) s.add('trauma'); if (ans.concerns.includes('motion')) s.add('coccul'), s.add('travelPop'); if (ans.concerns.includes('stress')) s.add('melat'), s.add('rescue'); // zachovat pořadí const order = ['vitC_250', 'vitC_100', 'zinc_nup', 'teaTree', 'dragon', 'charcoal', 'influ', 'enterol', 'imodium', 'tussirex', 'strepHerbal', 'auris', 'lichoKap', 'pinio', 'samahan', 'panthen', 'pycno', 'trauma', 'coccul', 'travelPop', 'melat', 'rescue']; return order.filter(k => s.has(k)).map(k => ({ key: k, ...itemsDB[k] })); }, [ans]); // export do TXT const exportTxt = () => { const lines = ['Cestovní lékárnička na míru', '', ...items.map(i => `• ${i.name} – ${i.desc}`), '', 'Potřebujete poradit?', 'Poradna: https://klub.lenkasobkova.cz/online-poradna/', '']; const blob = new Blob([lines.join('\n')], { type: 'text/plain' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'lekarnicka.txt'; a.click(); URL.revokeObjectURL(url); }; // export do PDF const exportPdf = () => { import('https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js').then(m => { const { jsPDF } = m.jspdf, doc = new jsPDF(); doc.setFontSize(14); doc.text('Cestovní lékárnička na míru', 10, 15); doc.setFontSize(10); let y = 25; items.forEach(i => { doc.text(`• ${i.name} – ${i.desc}`, 10, y); y += 6; if (y > 280) { doc.addPage(); y = 15; } }); doc.save('lekarnicka.pdf'); }); }; // tlačítko pro modál const ModalBtn = ({ type }) => /*#__PURE__*/React.createElement("button", { onClick: () => { const url = type === 'vitC' ? 'https://klub.lenkasobkova.cz/kalkulacka-vitaminu-c-2/' : 'https://klub.lenkasobkova.cz/kalkulacka-selenu-zinku/'; const wrap = document.createElement('div'); Object.assign(wrap.style, { position: 'fixed', inset: 0, background: 'rgba(0,0,0,0.4)', display: 'flex', justifyContent: 'center', alignItems: 'center', zIndex: 999 }); const box = document.createElement('div'); Object.assign(box.style, { background: '#fff', padding: '24px', borderRadius: '16px', maxWidth: '380px', textAlign: 'center' }); const link = document.createElement('a'); link.href = url; link.target = '_blank'; link.style = 'color:#15803d;text-decoration:none;margin-bottom:12px;display:block'; link.textContent = 'Chci si vybrat jinou značku'; const close = document.createElement('button'); close.textContent = 'Zavřít'; close.onclick = () => document.body.removeChild(wrap); Object.assign(close.style, { marginTop: '12px', padding: '8px 16px', background: '#e5e7eb', border: 'none', borderRadius: '8px', cursor: 'pointer' }); box.append(link, close); wrap.append(box); document.body.appendChild(wrap); } }, "\u2753"); // UI komponenty const Card = ({ title, children }) => /*#__PURE__*/React.createElement("div", { style: { maxWidth: 480, width: '90%', margin: '40px auto', padding: 24, background: '#fff', borderRadius: 20, boxShadow: '0 4px 20px rgba(0,0,0,.05)', textAlign: 'center' } }, /*#__PURE__*/React.createElement("h2", { style: { fontSize: '1.4rem', marginBottom: 16 } }, title), children); const Btn = ({ children, onClick, secondary = false, disabled = false }) => /*#__PURE__*/React.createElement("button", { onClick: onClick, disabled: disabled, style: { padding: '8px 16px', border: 'none', borderRadius: 8, margin: '8px', background: secondary ? '#e5e7eb' : '#ecf3eb', cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1 } }, children); const Label = ({ children }) => /*#__PURE__*/React.createElement("label", { style: { display: 'block', margin: '8px 0', textAlign: 'left' } }, children); // kroky wizardu if (step === 0) return /*#__PURE__*/React.createElement(Card, { title: "Kam cestujete?" }, ['sea:K moři', 'mountains:Do hor', 'city:Do velkoměsta', 'exotic:Do exotiky'].map(s => { const [v, l] = s.split(':'); return /*#__PURE__*/React.createElement(Label, { key: v }, /*#__PURE__*/React.createElement("input", { type: "radio", checked: ans.dest === v, onChange: () => setAns(a => ({ ...a, dest: v })) }), " ", l); }), /*#__PURE__*/React.createElement("div", { style: { textAlign: 'right' } }, /*#__PURE__*/React.createElement(Btn, { onClick: () => setStep(1), disabled: !ans.dest }, "Dal\u0161\xED"))); if (step === 1) return /*#__PURE__*/React.createElement(Card, { title: "Cestujete s d\u011Btmi? (v\xEDce mo\u017Enost\xED)" }, ['3-7:3–7 let', '8-14:8–14 let', 'none:Všem je víc než 15 let'].map(s => { const [v, l] = s.split(':'); return /*#__PURE__*/React.createElement(Label, { key: v }, /*#__PURE__*/React.createElement("input", { type: "checkbox", checked: ans.kidsAges.includes(v), onChange: e => setAns(a => { let arr = e.target.checked ? [...a.kidsAges.filter(x => x !== 'none'), v] : a.kidsAges.filter(x => x !== v); if (v === 'none') arr = e.target.checked ? ['none'] : []; return { ...a, kidsAges: arr }; }) }), " ", l); }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Btn, { onClick: () => setStep(0), secondary: true }, "Zp\u011Bt"), /*#__PURE__*/React.createElement(Btn, { onClick: () => setStep(2) }, "Dal\u0161\xED"))); if (step === 2) return /*#__PURE__*/React.createElement(Card, { title: "\u010Ceho se nejv\xEDc boj\xEDte? (v\xEDce mo\u017Enost\xED)" }, [['diarrhoea', 'Průjem a trávicí potíže'], ['bites', 'Štípance'], ['angina', 'Angíny z klimatizace'], ['ear', 'Bolavé oučko'], ['uti', 'Zánět močových cest / mykóza'], ['resp', 'Rýma, kašel, horečka'], ['sun', 'Spáleniny / sluneční alergie'], ['injury', 'Úrazy a natažené svaly'], ['motion', 'Cestovní nevolnost'], ['stress', 'Stres / nespavost']].map(([v, l]) => { return /*#__PURE__*/React.createElement(Label, { key: v }, /*#__PURE__*/React.createElement("input", { type: "checkbox", checked: ans.concerns.includes(v), onChange: e => setAns(a => ({ ...a, concerns: e.target.checked ? [...a.concerns, v] : a.concerns.filter(x => x !== v) })) }), " ", l); }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Btn, { onClick: () => setStep(1), secondary: true }, "Zp\u011Bt"), /*#__PURE__*/React.createElement(Btn, { onClick: () => setStep(3) }, "Zobrazit seznam"))); // krok 3 – seznam if (step === 3) return /*#__PURE__*/React.createElement(Card, { title: "Va\u0161e doporu\u010Den\xE1 l\xE9k\xE1rni\u010Dka" }, /*#__PURE__*/React.createElement("ul", { style: { listStyle: 'none', padding: 0, textAlign: 'left' } }, items.map(i => /*#__PURE__*/React.createElement("li", { key: i.key, style: { margin: '4px 0' } }, /*#__PURE__*/React.createElement("b", null, i.name), " \u2013 ", i.desc, (i.key === 'vitC_250' || i.key === 'vitC_100') && /*#__PURE__*/React.createElement(ModalBtn, { type: "vitC" }), i.key === 'zinc_nup' && /*#__PURE__*/React.createElement(ModalBtn, { type: "zinc" })))), /*#__PURE__*/React.createElement("div", { style: { textAlign: 'center' } }, /*#__PURE__*/React.createElement(Btn, { onClick: exportTxt }, "St\xE1hnout TXT"), /*#__PURE__*/React.createElement(Btn, { onClick: exportPdf, secondary: true }, "St\xE1hnout PDF"), /*#__PURE__*/React.createElement(Btn, { onClick: () => setStep(4) }, "A co te\u010F?"))); // krok 4 – děkovná stránka return /*#__PURE__*/React.createElement(Card, { title: "D\u011Bkujeme!" }, /*#__PURE__*/React.createElement("h3", { style: { margin: '16px 0' } }, "D\xEDky za sta\u017Een\xED va\u0161\xED cestovn\xED l\xE9k\xE1rni\u010Dky na m\xEDru!"), /*#__PURE__*/React.createElement("p", null, "V\u0161echny informace, jak je d\xE1vkovat v p\u0159\xEDpad\u011B pot\xED\u017E\xED, najdete"), /*#__PURE__*/React.createElement("a", { href: "https://klub.lenkasobkova.cz/knihovna-navodu-ke-zdravi/", target: "_blank", style: { display: 'inline-block', margin: '8px', padding: '10px 20px', background: '#ecf3eb', borderRadius: 8, textDecoration: 'none', color: 'inherit' } }, "v Knihovn\u011B"), /*#__PURE__*/React.createElement("p", null, "Kdyby v\xE1m cokoli nebylo jasn\xE9,"), /*#__PURE__*/React.createElement("a", { href: "https://klub.lenkasobkova.cz/online-poradna/", target: "_blank", style: { display: 'inline-block', margin: '8px', padding: '10px 20px', background: '#ecf3eb', borderRadius: 8, textDecoration: 'none', color: 'inherit' } }, "nev\xE1hejte mi napsat do Poradny"), /*#__PURE__*/React.createElement("p", null, /*#__PURE__*/React.createElement("b", null, "Nebojte, spolu nemoc p\u0159edb\u011Bhneme!")), /*#__PURE__*/React.createElement("p", null, "Mgr. Lenka Sobkov\xE1", /*#__PURE__*/React.createElement("br", null), "nez\xE1visl\xE1 l\xE9k\xE1rnice,", /*#__PURE__*/React.createElement("br", null), "zam\u011B\u0159en\xE1 na klasickou i p\u0159\xEDrodn\xED l\xE9\u010Dbu"), /*#__PURE__*/React.createElement("img", { src: "https://klub.lenkasobkova.cz/content/images/2025/06/web_dsc06927.jpg", style: { maxWidth: 220, borderRadius: '50%', margin: '16px auto' }, alt: "Mgr. Lenka Sobkov\xE1" })); } // render wizard ReactDOM.createRoot(document.getElementById('lekarnicka-wizard')).render(/*#__PURE__*/React.createElement(Wizard, null));