import type { IconName } from "@/lib/icons";
import type { FAQ } from "@/content/solutions";

export type IndustryMessage = {
  from: "user" | "agent";
  text: string;
  time?: string;
};

export type IndustryCallTurn = {
  speaker: string;
  text: string;
  time: string;
};

export type Industry = {
  slug: string;
  name: string;
  shortName: string;
  icon: IconName;
  tagline: string;
  description: string;
  image: string;
  imageAlt: string;

  hero: {
    h1: string;
    sub: string;
    agentName: string;
    agentDescription: string;
    chatScript: IndustryMessage[];
    callScript: IndustryCallTurn[];
    audioSample?: string;
  };

  showcaseMessaging: {
    title: string;
    description: string;
    logos?: string[];
    metrics?: { value: string; label: string }[];
    caseStudySlug?: string;
    chatTitle: string;
    chatSubtitle: string;
    messages: IndustryMessage[];
  };

  showcaseVoice: {
    title: string;
    description: string;
    logos?: string[];
    metrics?: { value: string; label: string }[];
    caseStudySlug?: string;
    callTitle: string;
    callSubtitle: string;
    durationSeconds: number;
    audioUrl?: string;
  };

  useCases: {
    title: string;
    description: string;
    tag: string;
    metric?: string;
  }[];

  faqs: FAQ[];
  seo?: { title: string; description: string };
};

// Official company verticals — Healthcare, Automobile, Real Estate.
// (Quto Chatbot Agent is a product that works with ANY website, not an industry.)
export const industries: Industry[] = [
  {
    slug: "healthcare",
    name: "Healthcare",
    shortName: "Healthcare",
    icon: "HeartPulse",
    tagline: "Fill the schedule, cut the no-shows.",
    description:
      "Agents that book appointments, send reminders and handle patient FAQs with careful HIPAA and DPDP data handling.",
    image: "/images/industries-healthcare-image.webp",
    imageAlt: "Healthcare AI voice and chat agent",

    hero: {
      h1: "AI agents for healthcare",
      sub: "Quto helps healthcare teams deliver responsive, personal conversations at scale, so every caller gets the clarity and continuity they need.",
      agentName: "Quto Healthcare Voice & Chat Agent",
      agentDescription:
        "24/7 support for patient queries, doctor scheduling, reminders and emergency triage across voice, WhatsApp and web.",
      chatScript: [
        { from: "user", text: "Hi, I need an urgent consultation with Dr. Sharma for cardiology." },
        { from: "agent", text: "Hello! Dr. Sharma has open OPD slots today at 4:30 PM and tomorrow at 11:00 AM at the Indiranagar clinic. Which works best for you?" },
        { from: "user", text: "Today at 4:30 PM please." },
        { from: "agent", text: "Booked! Your appointment ID is PR-4982. We've sent clinic directions and a digital token to your WhatsApp." },
      ],
      callScript: [
        { speaker: "Quto Agent", text: "Hello! Thank you for calling the clinic reception. How can I help you today?", time: "0:02" },
        { speaker: "Patient", text: "I have a cough and want to see a general physician this afternoon.", time: "0:07" },
        { speaker: "Quto Agent", text: "Certainly. Dr. Priya Rao is available today at 3:15 PM or 4:45 PM. Would you like me to reserve the 3:15 PM slot?", time: "0:14" },
        { speaker: "Patient", text: "Yes, 3:15 PM works well. Thank you!", time: "0:19" },
        { speaker: "Quto Agent", text: "You are confirmed with Dr. Rao at 3:15 PM. An SMS and WhatsApp pass have been dispatched to your mobile number.", time: "0:25" },
      ],
    },

    showcaseMessaging: {
      title: "Every patient conversation, moved forward with context",
      description:
        "When your front desk is busy, Quto handles routine queries and prescription refills with live context, then makes an intelligent warm handoff to your team with the full history attached.",
      chatTitle: "Clinic Reminder Agent",
      chatSubtitle: "Automated appointment & refill nudges",
      messages: [
        { from: "agent", text: "Hi! Your chronic medicine refill (Metformin 500mg) is due today. Should I arrange delivery to your registered address?", time: "19:43" },
        { from: "user", text: "Yes please, same address in Koramangala.", time: "19:44" },
        { from: "agent", text: "Order placed! Delivery expected by tomorrow 10:00 AM. Tap below to track it in real time.", time: "19:44" },
      ],
    },

    showcaseVoice: {
      title: "A simpler way to get the care you need",
      description:
        "Move beyond rigid IVRs with a natural conversation that checks doctor availability, suggests alternatives, and confirms appointments without caller hold times.",
      callTitle: "Inbound OPD Consultation Booking",
      callSubtitle: "Sub-second streaming voice agent with EHR/HMS lookup",
      durationSeconds: 28,
    },

    useCases: [
      {
        title: "Inbound OPD Doctor Scheduling",
        description: "Direct bi-directional sync with hospital management systems to book, reschedule, or cancel consultations without human reception bottlenecks.",
        tag: "Inbound Voice",
      },
      {
        title: "Automated WhatsApp Refill Nudges",
        description: "Scheduled interactive check-ins for chronic-illness patients, verifying prescriptions and capturing one-tap re-orders directly on WhatsApp.",
        tag: "WhatsApp Agent",
      },
      {
        title: "Emergency Symptom & Ward Triage",
        description: "Rapid intake of patient symptoms with instant warm transfer to on-call clinical staff, with a complete pre-populated clinical summary.",
        tag: "Voice & Chat",
      },
      {
        title: "Post-Op Recovery Follow-Ups",
        description: "Proactive voice check-ins after outpatient procedures to evaluate pain levels, confirm medication dosage, and flag complications.",
        tag: "Outbound Voice",
      },
    ],

    faqs: [
      {
        q: "Is patient health information (PHI) protected?",
        a: "Yes. All audio streams and chat transcripts comply with HIPAA and the India Digital Personal Data Protection (DPDP) Act. PHI can be redacted in real time before model inference, and no patient data is used to train shared foundation models.",
      },
      {
        q: "Can Quto integrate with our hospital EHR or HMS?",
        a: "Yes. Quto integrates with standard HL7/FHIR endpoints and your hospital management system (HMS/EHR) via REST/GraphQL APIs, so appointments and records stay in sync.",
      },
      {
        q: "How does the agent handle medical emergencies?",
        a: "If a caller indicates acute chest pain, difficulty breathing, or severe trauma, the agent triggers your emergency protocol, transfers to your emergency desk, and sends an urgent notification with the caller's details.",
      },
    ],
  },

  {
    slug: "automobile",
    name: "Automobile",
    shortName: "Automobile",
    icon: "Car",
    tagline: "Book more test drives and service slots.",
    description:
      "Agents that qualify car buyers, book test drives, schedule service, and send timely reminders for service, insurance and PUC renewals.",
    image: "/images/industries-automobile-image.webp",
    imageAlt: "Automobile AI voice and chat agent",

    hero: {
      h1: "AI agents for automobile",
      sub: "Quto helps dealerships and service centres answer every enquiry instantly — qualifying buyers, booking test drives and filling service bays without ever missing a call.",
      agentName: "Quto Automobile Voice & Chat Agent",
      agentDescription:
        "24/7 support for sales enquiries, test-drive bookings, service scheduling and renewal reminders across voice, WhatsApp and web.",
      chatScript: [
        { from: "user", text: "Is the top automatic variant available for a test drive this weekend?" },
        { from: "agent", text: "Yes! It's ready at the Whitefield showroom. I can book a test drive for Saturday 11:00 AM or Sunday 4:00 PM — which suits you?" },
        { from: "user", text: "Saturday 11 works." },
        { from: "agent", text: "Done — test drive booked for Saturday 11:00 AM. I've sent the showroom location to your WhatsApp. Shall I keep a finance quote ready too?" },
      ],
      callScript: [
        { speaker: "Quto Agent", text: "Thanks for calling the service centre. How can I help you today?", time: "0:02" },
        { speaker: "Customer", text: "My car is due for its 20,000 km service. Can I get a slot this week?", time: "0:08" },
        { speaker: "Quto Agent", text: "Of course. We have Wednesday 10:00 AM or Thursday 9:30 AM open. Shall I reserve Wednesday and arrange a doorstep pickup?", time: "0:15" },
        { speaker: "Customer", text: "Wednesday with pickup, please.", time: "0:20" },
        { speaker: "Quto Agent", text: "Booked for Wednesday 10:00 AM with doorstep pickup. A confirmation and service checklist are on their way to your WhatsApp.", time: "0:27" },
      ],
    },

    showcaseMessaging: {
      title: "Never let a service or renewal slip",
      description:
        "Quto sends timely WhatsApp nudges for service due dates, insurance and PUC renewals, then books the slot in a single tap — keeping bays full and customers on the road.",
      chatTitle: "Service Reminder Agent",
      chatSubtitle: "Proactive service & renewal nudges",
      messages: [
        { from: "agent", text: "Hi Rohan! Your car's periodic service is due this week, and insurance renews on the 28th. Want me to book a service slot and share a renewal quote?", time: "10:12" },
        { from: "user", text: "Yes, book service for Saturday morning.", time: "10:13" },
        { from: "agent", text: "Booked for Saturday 10:00 AM with free pickup. I've also sent your insurance renewal quote — tap to pay when you're ready.", time: "10:13" },
      ],
    },

    showcaseVoice: {
      title: "Answer every sales call, even after hours",
      description:
        "Turn missed calls into booked test drives. Quto greets callers, checks model and variant availability, qualifies budget and timeline, and hands hot leads to your sales team with full context.",
      callTitle: "Inbound Sales Enquiry",
      callSubtitle: "Streaming voice agent with DMS/CRM lookup",
      durationSeconds: 26,
    },

    useCases: [
      {
        title: "Test-Drive Scheduling",
        description: "Qualify walk-in and online enquiries, check model and variant availability, and book test drives straight into your sales calendar.",
        tag: "Inbound Voice",
      },
      {
        title: "Service & Renewal Reminders",
        description: "Proactive WhatsApp and call reminders for periodic service, insurance, warranty and PUC renewals, with one-tap slot booking.",
        tag: "WhatsApp Agent",
      },
      {
        title: "Sales Lead Qualification",
        description: "Capture budget, preferred model, finance need and timeline, then route hot buyers to the right salesperson with the full conversation attached.",
        tag: "Voice & Chat",
      },
      {
        title: "Service Feedback & Follow-Ups",
        description: "Post-service voice check-ins to confirm satisfaction, resolve issues, and re-book if any work is still pending.",
        tag: "Outbound Voice",
      },
    ],

    faqs: [
      {
        q: "Can the agent book directly into our DMS or service calendar?",
        a: "Yes. Quto connects to common dealer management systems (DMS) and CRMs via standard REST/GraphQL APIs, so test drives and service slots are booked without double-booking.",
      },
      {
        q: "Can it handle enquiries in regional languages?",
        a: "Yes. Quto handles English, Hindi and major Indian languages with real-time code-switching, matching the way buyers actually speak.",
      },
      {
        q: "What happens to leads outside working hours?",
        a: "The agent answers 24/7 — it qualifies the enquiry, books any available slot, and queues a prioritised follow-up for your team the next morning, so no lead goes cold.",
      },
    ],
  },

  {
    slug: "real-estate",
    name: "Real Estate",
    shortName: "Real Estate",
    icon: "Building2",
    tagline: "Respond to every lead in seconds.",
    description:
      "Agents that call back portal leads instantly, qualify buyers, schedule site visits, and follow up so no property enquiry goes cold.",
    image: "/images/industries-real-eastate-image.webp",
    imageAlt: "Real estate AI voice and chat agent",

    hero: {
      h1: "AI agents for real estate",
      sub: "Quto helps developers and brokers respond to every property enquiry in seconds — qualifying buyers, booking site visits and following up until they're ready to decide.",
      agentName: "Quto Real Estate Voice & Chat Agent",
      agentDescription:
        "24/7 instant lead response, buyer qualification, site-visit scheduling and follow-ups across voice, WhatsApp and web.",
      chatScript: [
        { from: "user", text: "I saw the 3BHK listing in Gachibowli. Is it still available?" },
        { from: "agent", text: "Yes, it's available — a 3BHK, 1,650 sq ft, with two covered parkings. Would you like to book a site visit this weekend?" },
        { from: "user", text: "Sure, Sunday afternoon." },
        { from: "agent", text: "Booked for Sunday 3:00 PM. I've shared the location, floor plan and pricing on WhatsApp. Shall I keep a home-loan option ready as well?" },
      ],
      callScript: [
        { speaker: "Quto Agent", text: "Hi, thanks for your enquiry on the Riverside project. Are you looking for a 2 or 3 BHK?", time: "0:02" },
        { speaker: "Caller", text: "3 BHK, budget around 1.2 crore, ready to move in.", time: "0:08" },
        { speaker: "Quto Agent", text: "Perfect — we have ready-to-move 3BHKs in that range. I can arrange a site visit on Saturday or Sunday. Which works for you?", time: "0:15" },
        { speaker: "Caller", text: "Saturday morning.", time: "0:20" },
        { speaker: "Quto Agent", text: "Done. Your site visit is confirmed for Saturday 11:00 AM. Directions and the brochure are on their way to your WhatsApp.", time: "0:26" },
      ],
    },

    showcaseMessaging: {
      title: "Keep every buyer warm until the visit",
      description:
        "Quto shares brochures, floor plans and pricing on WhatsApp, sends visit reminders, and answers follow-up questions instantly — so interested buyers actually show up.",
      chatTitle: "Site-Visit Concierge",
      chatSubtitle: "Brochures, reminders & follow-ups",
      messages: [
        { from: "agent", text: "Hi Meera! A quick reminder about your site visit to Riverside tomorrow at 11 AM. I've attached the floor plan and directions. Shall I arrange a pickup?", time: "18:05" },
        { from: "user", text: "Yes please, from Hitech City.", time: "18:06" },
        { from: "agent", text: "Arranged! Our team will pick you up at 10:30 AM from Hitech City. See you tomorrow — reply here anytime if your plans change.", time: "18:06" },
      ],
    },

    showcaseVoice: {
      title: "Call back every portal lead in under a minute",
      description:
        "Speed wins deals. The moment a lead arrives from a portal or ad, Quto calls back, qualifies budget, configuration and timeline, and books the site visit before the competition responds.",
      callTitle: "Instant Portal-Lead Callback",
      callSubtitle: "Outbound voice agent with CRM sync",
      durationSeconds: 24,
    },

    useCases: [
      {
        title: "Instant Lead Callback",
        description: "Call every portal, ad and website lead within seconds, so hot buyers are engaged before they move on to another project.",
        tag: "Outbound Voice",
      },
      {
        title: "Buyer Qualification",
        description: "Capture budget, configuration (BHK), preferred location and move-in timeline, then route qualified buyers to the right sales manager.",
        tag: "Voice & Chat",
      },
      {
        title: "Site-Visit Scheduling",
        description: "Book, confirm and remind buyers about site visits on WhatsApp, with directions, pickups and floor plans shared automatically.",
        tag: "WhatsApp Agent",
      },
      {
        title: "Post-Visit Follow-Ups",
        description: "Nurture buyers after a visit with answers, updated availability and gentle nudges, until they're ready to make a decision.",
        tag: "Outbound Voice",
      },
    ],

    faqs: [
      {
        q: "Can Quto pull leads from property portals and our CRM?",
        a: "Yes. Quto connects to common real-estate CRMs and lead sources via standard APIs, so every portal and ad enquiry is called back and logged automatically.",
      },
      {
        q: "How fast does it respond to a new lead?",
        a: "The agent can call or message a new lead within seconds of it arriving — the response speed that decides most property enquiries.",
      },
      {
        q: "Can it speak to buyers in their preferred language?",
        a: "Yes. Quto handles English, Hindi and major Indian languages with natural, real-time code-switching.",
      },
    ],
  },
];

export function getIndustry(slug: string): Industry | undefined {
  return industries.find((i) => i.slug === slug);
}

// Canonical slugs only (healthcare, automobile, real-estate).
export const industrySlugs = industries.map((i) => i.slug);
