// Anzeigenkette — week schedule + hooks
// Globals: window.HOOKS, window.WEEK_SCHEDULE

window.HOOKS = {
  aufstieg:      { label: "Aufstieg",      color: "#F4B860", text: "Wartest Du auf die Leitungsstelle?" },
  entwicklung:   { label: "Entwicklung",   color: "#FFA94D", text: "Monatelang gebüffelt — und jetzt?" },
  alltag:        { label: "Alltag",        color: "#FF8B6B", text: "Akte mit Fahrverbot. Deine finale Unterschrift." },
  einwand:       { label: "Einwand",       color: "#E94B3C", text: "Sorge vor dem neuen Team? Verständlich." },
  verantwortung: { label: "Verantwortung", color: "#FFC857", text: "Schluss mit dem Verwalten Deines Potenzials." },
  gehalt:        { label: "Gehalt",        color: "#D17A47", text: "EG 9b / A 10 wartet — wenn Du Dich traust." },
};

// dayIdx: 0=Mi … 6=Di
window.DAY_LABELS = ['Mi', 'Do', 'Fr', 'Sa', 'So', 'Mo', 'Di'];
window.DAY_LONG = ['Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag', 'Montag', 'Dienstag'];

// daypart slot: 0=morgens, 1=mittags, 2=nachmittags, 3=abends
function daypart(timeStr) {
  const h = parseInt(timeStr.split(':')[0], 10);
  if (h < 11) return 0;
  if (h < 14) return 1;
  if (h < 19) return 2;
  return 3;
}

window.WEEK_SCHEDULE = [
  // Tag 1 — Mi (full detailed stations)
  { day: 0, points: [
    { time: '06:47', platform: 'Wetter-App',     hook: 'aufstieg' },
    { time: '12:34', platform: 'Instagram-Feed', hook: 'entwicklung' },
    { time: '16:12', platform: 'Instagram-Reel', hook: 'alltag' },
    { time: '21:15', platform: 'YouTube',        hook: 'einwand' },
  ]},
  // Tag 2 — Do
  { day: 1, points: [
    { time: '07:02', platform: 'News-App',         hook: 'verantwortung' },
    { time: '13:18', platform: 'Instagram-Story',  hook: 'gehalt' },
    { time: '17:30', platform: 'Spotify-Display',  hook: 'entwicklung' },
    { time: '22:01', platform: 'YouTube',          hook: 'aufstieg' },
  ]},
  // Tag 3 — Fr
  { day: 2, points: [
    { time: '06:50', platform: 'Wetter-App',      hook: 'alltag' },
    { time: '12:45', platform: 'Instagram-Reel',  hook: 'aufstieg' },
    { time: '20:30', platform: 'YouTube',         hook: 'einwand' },
  ], thought: 'Schon wieder dieser Job. Komisch.' },
  // Tag 4 — Sa
  { day: 3, points: [
    { time: '10:15', platform: 'Pinterest-Feed',  hook: 'gehalt' },
    { time: '15:00', platform: 'Facebook-Feed',   hook: 'alltag' },
    { time: '21:30', platform: 'YouTube',         hook: 'entwicklung' },
  ], thought: 'Die suchen ja wirklich jemanden.' },
  // Tag 5 — So
  { day: 4, points: [
    { time: '11:00', platform: 'Spotify',         hook: 'aufstieg' },
    { time: '16:30', platform: 'Instagram-Reel',  hook: 'verantwortung' },
    { time: '22:30', platform: 'YouTube',         hook: 'einwand' },
  ], thought: 'Eigentlich nicht unmöglich.' },
  // Tag 6 — Mo
  { day: 5, points: [
    { time: '06:55', platform: 'Wetter-App',      hook: 'gehalt' },
    { time: '12:30', platform: 'Instagram-Feed',  hook: 'aufstieg' },
    { time: '19:45', platform: 'News-App',        hook: 'alltag' },
  ], thought: 'Wäre das mein Alltag dort?' },
  // Tag 7 — Di (klick)
  { day: 6, points: [
    { time: '07:10', platform: 'Wetter-App',      hook: 'einwand' },
    { time: '12:20', platform: 'Instagram-Reel',  hook: 'entwicklung', click: true },
  ]},
];

window.daypart = daypart;

// total touchpoints
window.TOTAL_TOUCHPOINTS = window.WEEK_SCHEDULE.reduce((s, d) => s + d.points.length, 0);

// hook counts
window.HOOK_COUNTS = (() => {
  const c = {};
  Object.keys(window.HOOKS).forEach(k => c[k] = 0);
  window.WEEK_SCHEDULE.forEach(d => d.points.forEach(p => { c[p.hook] = (c[p.hook] || 0) + 1; }));
  return c;
})();
