"use client";

import {
  Mail,
  Printer,
  Upload,
  Smartphone,
  Server,
  Inbox,
  FolderSync,
  Clock,
} from "lucide-react";
import { FeaturePageShell, DetailBlock, StatRow } from "@/components/marketing/feature-page-shell";

export default function ScannerIntegrationPage() {
  return (
    <FeaturePageShell
      badge="Ingestion"
      badgeIcon={Printer}
      title="Three ways in."
      titleAccent="Zero manual steps."
      subtitle="Upload from your phone, scan to email, or send batches via FTP. Echo picks up files automatically and starts processing — no one has to sit at a computer."
    >
      <section className="py-12 sm:py-16">
        <div className="mx-auto max-w-4xl px-6 space-y-6">
          <StatRow
            stats={[
              { value: "3", label: "Ingestion methods" },
              { value: "2 min", label: "Auto-poll interval" },
              { value: "50 MB", label: "Max file size" },
            ]}
          />

          <DetailBlock icon={Upload} title="Drag & drop upload">
            <p>
              The simplest path: open Echo on your phone, tablet, or computer, and
              drag files onto the card grid. Or click the upload button in the
              header. Supports PDF, JPEG, PNG, and WebP.
            </p>
            <p>
              Perfect for volunteers who snap photos of cards with their phone right
              after the service. Multi-file upload means you can select an entire
              folder at once.
            </p>
          </DetailBlock>

          <DetailBlock icon={Mail} title="Scan to Email" reversed>
            <p>
              Configure your office multi-function printer to email scanned documents
              to a dedicated inbox. Echo polls that inbox every two minutes, downloads
              PDF and image attachments, and queues them for processing automatically.
            </p>
            <p>
              After processing, Echo can mark emails as read or move them to a
              &ldquo;processed&rdquo; folder — so your inbox stays clean.
            </p>
            <p>
              Works with any IMAP-compatible email provider: Gmail, Outlook,
              Dreamhost, Yahoo, or your church&rsquo;s hosted email.
            </p>
          </DetailBlock>

          <DetailBlock icon={Server} title="Scan to FTP">
            <p>
              For high-volume environments, configure your scanner to send batches to
              an FTP server. Echo connects via FTP/FTPS, downloads new files from the
              incoming directory, processes them, and moves them to a &ldquo;processed&rdquo;
              folder.
            </p>
            <p>
              This is ideal for churches that run multiple scanners at different
              campuses — each scanner sends to the same FTP endpoint and Echo handles
              all of them.
            </p>
          </DetailBlock>

          <DetailBlock icon={Smartphone} title="Works with any scanner" reversed>
            <p>
              Ricoh, Xerox, Canon, HP, Brother, Epson — if your printer has a
              &ldquo;Scan to Email&rdquo; or &ldquo;Scan to FTP&rdquo; option in its
              address book (most do), it works with Echo. No special software, no
              drivers, no plugins.
            </p>
            <p>
              Don&rsquo;t have a dedicated scanner? A smartphone camera works too.
              Take a photo, upload it, and Echo reads it just the same.
            </p>
          </DetailBlock>

          <DetailBlock icon={Inbox} title="Smart attachment handling">
            <p>
              Echo filters email attachments by type and size — it only processes
              PDFs and images, ignoring signatures, logos, and other irrelevant
              attachments. Multi-attachment emails are supported: each valid file
              becomes its own processing job.
            </p>
          </DetailBlock>

          <DetailBlock icon={Clock} title="Automatic polling on a schedule" reversed>
            <p>
              Both email and FTP watchers run on a two-minute cron cycle. Cards
              scanned and emailed during the Sunday service start appearing in your
              dashboard within minutes — without anyone touching a computer.
            </p>
          </DetailBlock>

          <DetailBlock icon={FolderSync} title="Full audit trail">
            <p>
              Every import is tracked as a processing job with source metadata:
              where the file came from (upload, email, FTP), when it arrived, how
              many cards were extracted, and the processing status. You always know
              what happened and when.
            </p>
          </DetailBlock>
        </div>
      </section>
    </FeaturePageShell>
  );
}
