"use client";

import {
  CalendarDays,
  Repeat,
  Wand2,
  ListChecks,
  Calendar,
  MapPin,
  Settings,
} from "lucide-react";
import { FeaturePageShell, DetailBlock } from "@/components/marketing/feature-page-shell";

export default function CollectionDaysPage() {
  return (
    <FeaturePageShell
      badge="Event Management"
      badgeIcon={CalendarDays}
      title="Organize cards by"
      titleAccent="service, not just date."
      subtitle="Define your recurring services and events. Echo auto-assigns scanned cards to the right event so you always know which Sunday, which campus, and which service a card came from."
    >
      <section className="py-12 sm:py-16">
        <div className="mx-auto max-w-4xl px-6 space-y-6">
          <DetailBlock icon={Repeat} title="Recurring events with flexible scheduling">
            <p>
              Create collection days that repeat on a schedule: every Sunday at
              9 AM, the first Wednesday of the month, bi-weekly small groups — whatever
              fits your church calendar.
            </p>
            <p>
              Echo uses the RFC 5545 recurrence standard (the same one Google Calendar
              uses) so it can handle complex patterns like &ldquo;every Sunday except
              holidays&rdquo; or &ldquo;first and third Saturdays.&rdquo;
            </p>
          </DetailBlock>

          <DetailBlock icon={Wand2} title="Automatic card-to-event assignment" reversed>
            <p>
              When cards are processed, Echo looks at the timestamp, your location,
              and your event schedule to automatically assign each card to the most
              recent matching service. A batch scanned Monday morning? Echo knows it
              came from last Sunday&rsquo;s service.
            </p>
            <p>
              Three assignment strategies, configurable per organization:
            </p>
            <ul className="list-disc list-inside space-y-1 mt-2">
              <li><strong>Most recent</strong> &mdash; auto-assign to the nearest past event within your time window</li>
              <li><strong>Prompt user</strong> &mdash; suggest a match but let the reviewer confirm</li>
              <li><strong>Manual only</strong> &mdash; leave assignment to team members</li>
            </ul>
          </DetailBlock>

          <DetailBlock icon={Calendar} title="One-off events too">
            <p>
              Not everything is recurring. Create one-off collection days for special
              events like Easter services, VBS, community outreach days, or
              conferences. These work exactly like recurring events but with a single
              fixed date.
            </p>
          </DetailBlock>

          <DetailBlock icon={MapPin} title="Tied to locations" reversed>
            <p>
              Each collection day belongs to a specific location. This means your
              downtown campus can have different service times than your north campus,
              and cards scanned at each location are assigned to the correct event
              automatically.
            </p>
          </DetailBlock>

          <DetailBlock icon={ListChecks} title="See cards by event">
            <p>
              Browse all cards collected during a specific service. Filter your card
              table by event to see exactly who visited on Easter Sunday at your
              Main Street campus vs. your Northside campus. Great for targeted
              follow-up.
            </p>
          </DetailBlock>

          <DetailBlock icon={Settings} title="Configurable assignment window" reversed>
            <p>
              The auto-assignment engine looks backward in time for a matching event.
              The default window is 48 hours, but you can adjust this per organization.
              A 72-hour window works well for churches that scan cards on Monday or
              Tuesday.
            </p>
          </DetailBlock>
        </div>
      </section>
    </FeaturePageShell>
  );
}
