export interface MindfulPillar {
  title: string
  points: string[]
}

export interface MindfulJournal {
  photo?: string
  headline: string
  questions: string[]
}

export interface MindfulQuote {
  text: string
  author: string
}

export interface MindfulSession {
  slug: string
  month: string
  day: string
  topic?: string
  desc: string
  title: string
  recap: string[]
  takeaway?: string
  pillars?: MindfulPillar[]
  journal?: MindfulJournal
  quote?: MindfulQuote
  homeworkTip?: string
  photos: (string | null)[]
}

export const mindfulSessions: MindfulSession[] = [
  {
    slug: 'what-makes-a-leader',
    month: 'AUG', day: '17', topic: 'Confidence', desc: 'Preparation, self-talk, and lifting up teammates.', title: 'What Makes a Leader',
    recap: [
      'A strong leader inspires trust through confidence, emotional intelligence, and accountability. They make decisions with conviction, understand and connect with others, and take ownership of their actions and results. These qualities help leaders build stronger teams, navigate challenges, and create a positive impact.',
    ],
    takeaway: 'Confidence grows through preparation, positive self-talk, and supporting your teammates.',
    pillars: [
      { title: 'Confidence', points: ['The belief in our abilities, judgements, and values.', 'Helps us make tough decisions, handle criticism, and inspire certainty in others.', 'Drives decisiveness, builds trust, and boosts resilience.'] },
      { title: 'Emotional Intelligence', points: ['The ability to recognize, understand, and manage our emotions and the emotions of others.', 'Five core pillars: self awareness, self regulation, motivation, empathy, and social skills.'] },
      { title: 'Accountability', points: ['The ability to take ownership of our choices, actions, and the final results no matter the outcome.', 'Modeling integrity over blame.', 'Builds trust and improves performance.'] },
    ],
    journal: {
      photo: '/images/mindful-mondays/session1-journal.webp',
      headline: 'Reflect on Your Leadership',
      questions: ['How have you modeled being a leader in the classroom, on the court, and in the world?', 'What are ways you can build your leadership skills?'],
    },
    quote: { text: 'If your actions create a legacy that inspires others to dream more, learn more, do more, and become more, then you are a TRUE LEADER.', author: '' },
    homeworkTip: 'Teamwork',
    photos: [
      '/images/mindful-mondays/session1-confidence.webp',
      '/images/mindful-mondays/session1-emotional-intelligence.webp',
      '/images/mindful-mondays/session1-girls-in-sports.webp',
      '/images/mindful-mondays/session1-teamwork.webp',
      '/images/mindful-mondays/session1-accountability.webp',
    ],
  },
  {
    slug: 'teamwork',
    month: 'AUG', day: '24', desc: 'Teamwork makes the dream work.', title: 'Teamwork',
    recap: [
      `In this Mindful Mondays session, DLEAG student athletes explored what it means to be a strong teammate both on and off the court. Through interactive activities and guided reflection, participants focused on three important skills that contribute to successful teamwork: communication, active listening, and leadership through collaboration.`,
      `Student athletes were encouraged to think about the unique strengths they bring to their teams and how they can use those strengths to create a more positive and supportive team dynamic. The session concluded with a journal reflection asking players to consider what skills they can share with their current team and how they can personally help their team grow stronger together.`,
      `The goal of the session was to remind student athletes that great teams are built not only through individual talent, but through trust, communication, encouragement, and a shared commitment to working toward a common goal.`,
    ],
    pillars: [
      { title: 'Communication', points: ['Effective communication of ideas to reach a certain goal.'] },
      { title: 'Active Listening', points: ['Being present and understanding the things that people have to say.'] },
      { title: 'Leadership/Collaboration', points: ['Leading a group and working together to reach a common goal.'] },
    ],
    journal: {
      photo: '/images/mindful-mondays/Session 2_ Teamwork_4.jpeg',
      headline: 'Build Better Teamwork',
      questions: ['What skills can you share to help your current team?', 'How can you help improve your team dynamic overall?'],
    },
    quote: { text: 'Alone we can do so little; together we can do so much.', author: '' },
    homeworkTip: 'Cultivating Positive Support',
    photos: [
      '/images/mindful-mondays/Session 2_ Teamwork_6.jpeg',
      '/images/mindful-mondays/Session 2_ Teamwork_5.jpeg',
      '/images/mindful-mondays/Session 2_ Teamwork_7.jpeg',
      '/images/mindful-mondays/Session 2_ Teamwork_3.jpeg',
      '/images/mindful-mondays/Session 2_ Teamwork_2.jpeg',
    ],
  },
  {
    slug: 'cultivating-positive-support',
    month: 'AUG', day: '31', desc: 'Lifting each other up, on and off the court.', title: 'Cultivating Positive Support',
    recap: [
      `In this Mindful Mondays session, DLEAG student athletes explored the importance of positive support—providing encouragement, validation, and practical help while focusing on a person’s strengths rather than their weaknesses. The session encouraged student athletes to think about how the way they support one another can shape both individual confidence and the overall team environment.`,
      `Student athletes also learned why positive support matters in sports. The session highlighted how celebrating teammates’ wins can strengthen team culture, how encouragement can help lower stress and separate identity from performance, and how focusing on growth rather than fear of failure can lead to stronger motivation and better performance.`,
      `Through the session discussion and activity, players were encouraged to recognize the impact they can have on those around them—not only as student athletes, but also as teammates and leaders. The message reinforced that leadership can be as simple as lifting others up, meeting people where they are, and helping create an environment where everyone feels supported and encouraged to grow.`,
    ],
    pillars: [
      { title: 'Improves Team Culture', points: ['Celebrate each other’s wins and successes and builds a positive environment.'] },
      { title: 'Motivation to Grow', points: ['A desire to grow rather than fear of failure leads to better performance.'] },
      { title: 'Protects Mental Health', points: ['Lowers stress and anxiety and separates identity from performance.'] },
    ],
    quote: { text: 'One of the most lasting things you can do as a leader is to lift others and to see people where they are.', author: '' },
    photos: [
      '/images/mindful-mondays/Session 3_ Positive Support_3.jpeg',
      '/images/mindful-mondays/Session 3_ Positive Support_2.jpg',
      '/images/mindful-mondays/Session 3_ Positive Support_4.jpeg',
      '/images/mindful-mondays/Session 3_ Positive Support_5.jpg',
      '/images/mindful-mondays/Session 3_ Positive Support_6.jpg',
    ],
  },
]

export function getMindfulSessionDate(session: MindfulSession): Date {
  return new Date(`${session.month} ${session.day}, 2026`)
}

/** Sessions that have already happened, most recent first. */
export function getPastMindfulSessions(referenceDate = new Date()): { session: MindfulSession; number: number }[] {
  return mindfulSessions
    .map((session, i) => ({ session, number: i + 1 }))
    .filter(({ session }) => getMindfulSessionDate(session) <= referenceDate)
    .reverse()
}

export function getDefaultMindfulSlug(referenceDate = new Date()): string {
  const past = getPastMindfulSessions(referenceDate)
  return (past[0] ?? { session: mindfulSessions[0] }).session.slug
}
