import type { VpnProvider, FAQItem, Criterion } from "./types";
import { siteConfig } from "./site-config";

/**
 * Every figure below comes from a first-party source, checked September 2026:
 *   - App Store listing names, seller names, ratings and rating counts:
 *     Apple's iTunes lookup API.
 *   - Servers / countries / devices / refund terms: each provider's own
 *     App Store description or website.
 *   - VPNFast: https://vpnproxymaster.app/vpn-for-macos/
 *
 * Prices are deliberately absent. Every provider here discounts continuously,
 * so any figure we hard-code is wrong within weeks. The table says so and
 * sends people to the provider instead.
 */

/** Our own product. Reviewed by the same criteria as everything else. */
export const ourPick: VpnProvider = {
  slug: "vpnfast",
  name: siteConfig.appName,
  appStoreName: "",
  developer: siteConfig.operator,
  logo: "/images/app-icon.png",
  // Supplied by VPNSuperFast. No rating count is shown because we have no
  // verified figure for one — see StarRating, which omits it when null.
  rating: 4.6,
  ratingCount: null,
  summary:
    "1,500+ servers across 190+ countries with unlimited bandwidth, a strict no-logs policy, and a kill switch and split tunnelling built into the macOS app.",
  servers: "1,500+",
  countries: "190+",
  devices: "8",
  refund: "30 days",
  priceFrom: "Free",
  noLogs: true,
  streaming: "Yes",
  highlights: [
    "1,500+ servers · 190+ countries",
    "8 devices on one account",
    "30-day money-back guarantee",
  ],
  url: siteConfig.productUrl,
  isOurs: true,
};

/** Ranked alternatives, best all-rounder first. */
export const alternatives: VpnProvider[] = [
  {
    slug: "nordvpn",
    name: "NordVPN",
    appStoreName: "NordVPN: VPN Fast & Secure",
    developer: "Nordvpn S.A.",
    logo: "/images/vpn-logos/nordvpn.jpg",
    rating: 4.7,
    ratingCount: 698486,
    summary:
      "The strongest all-rounder. NordLynx holds its speed over long distances and the no-logs policy has been audited repeatedly. There is no free tier.",
    servers: "8,900+",
    countries: "149",
    devices: "10",
    refund: "30 days",
    priceFrom: "$3.49",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "8,900+ servers · 149 countries",
      "10 devices per account",
      "30-day money-back guarantee",
    ],
    url: "https://nordvpn.com",
  },
  {
    slug: "protonvpn",
    name: "Proton VPN",
    appStoreName: "Proton VPN: Fast & Secure",
    developer: "Proton AG",
    logo: "/images/vpn-logos/protonvpn.jpg",
    rating: 4.6,
    ratingCount: 98867,
    summary:
      "The privacy pick, and the best free plan here. Swiss-based, open-source and independently audited; the free tier is limited to one device.",
    servers: "20,000+",
    countries: "140+",
    devices: "10",
    refund: "30 days",
    priceFrom: "$3.49",
    noLogs: true,
    streaming: "Paid plans",
    highlights: [
      "20,000+ servers · 140+ countries",
      "10 devices (1 on the free plan)",
      "Free plan + 30-day refund",
    ],
    url: "https://protonvpn.com",
  },
  {
    slug: "surfshark",
    name: "Surfshark",
    appStoreName: "Surfshark VPN: Fast & Secure",
    developer: "SURFSHARK LTD",
    logo: "/images/vpn-logos/surfshark.jpg",
    rating: 4.7,
    ratingCount: 127732,
    summary:
      "Best value for a household — one subscription covers unlimited devices on a fast RAM-only network, with ad blocking bundled into the Mac app.",
    servers: "4,500+",
    countries: "100",
    devices: "Unlimited",
    refund: "30 days",
    priceFrom: "$2.49",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "4,500+ servers · 100 countries",
      "Unlimited devices",
      "30-day refund + 7-day trial",
    ],
    url: "https://surfshark.com",
  },
  {
    slug: "expressvpn",
    name: "ExpressVPN",
    appStoreName: "ExpressVPN · Secure & Fast VPN",
    developer: "Expressco Services, LLC",
    logo: "/images/vpn-logos/expressvpn.jpg",
    rating: 4.7,
    ratingCount: 418292,
    summary:
      "The most polished Mac client, and the easiest to hand to a first-time VPN user. Every server runs from RAM and wipes on reboot.",
    servers: "214 locations",
    countries: "113",
    devices: "10",
    refund: "30 days",
    priceFrom: "$2.99",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "214 locations · 113 countries",
      "10 devices per account",
      "30-day money-back guarantee",
    ],
    url: "https://www.expressvpn.com",
  },
  {
    slug: "pia",
    name: "Private Internet Access",
    appStoreName: "VPN by Private Internet Access",
    developer: "Private Internet Access, Inc.",
    logo: "/images/vpn-logos/pia.jpg",
    rating: 4.7,
    ratingCount: 149131,
    summary:
      "Unlimited devices on a single subscription, open-source apps, and a no-logs policy that has been tested in court. Coverage includes all 50 US states.",
    servers: "154+ locations",
    countries: "91",
    devices: "Unlimited",
    refund: "30 days",
    priceFrom: "$2.03",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "154+ locations · 91 countries",
      "Unlimited devices",
      "30-day refund + 7-day trial",
    ],
    url: "https://www.privateinternetaccess.com",
  },
  {
    slug: "cyberghost",
    name: "CyberGhost",
    appStoreName: "CyberGhost: Safe & Private VPN",
    developer: "Cyberghost SRL",
    logo: "/images/vpn-logos/cyberghost.jpg",
    rating: 4.2,
    ratingCount: 39361,
    summary:
      "Cheap and beginner-friendly, with one-click profiles for streaming and one of the largest networks here. Its 45-day refund is the joint-longest here — the monthly plan gets 14 days.",
    servers: "9,700+",
    countries: "100",
    devices: "7",
    refund: "45 days",
    priceFrom: "$2.19",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "9,700+ servers · 100 countries",
      "7 devices per account",
      "45-day refund (14 on monthly)",
    ],
    url: "https://www.cyberghostvpn.com",
  },
  {
    slug: "turbovpn",
    name: "Turbo VPN",
    appStoreName: "Turbo VPN Private Browser",
    developer: "INNOVATIVE CONNECTING PTE.LIMITED",
    logo: "/images/vpn-logos/turbovpn.jpg",
    rating: 4.7,
    ratingCount: 205683,
    summary:
      "One of the largest networks on this page, with a free tier and a straightforward Mac app. The Gold plan covers 10 devices; Platinum doubles that to 20.",
    servers: "21,000+",
    countries: "111 locations",
    devices: "10",
    refund: "30 days",
    priceFrom: "$3.33",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "21,000+ servers · 111 locations",
      "10 devices (20 on Platinum)",
      "Free tier + 30-day money-back",
    ],
    url: "https://turbovpn.com",
  },
  {
    slug: "vpnproxymaster",
    name: "VPN Proxy Master",
    appStoreName: "VPN Proxy Master - Super VPN",
    developer: "All Connected Co., Ltd",
    logo: "/images/vpn-logos/vpnproxymaster.jpg",
    rating: 4.6,
    ratingCount: 310217,
    summary:
      "A big, long-running network with AES-256 encryption, a kill switch and DNS leak protection. No free tier — the entry price is the 30-month plan.",
    servers: "20,000+",
    countries: "100+ locations",
    devices: "10",
    refund: "30 days",
    priceFrom: "$3.33",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "20,000+ servers · 100+ locations",
      "10 devices per account",
      "30-day money-back guarantee",
    ],
    url: "https://vpnproxymaster.com",
  },
  {
    slug: "hotspotshield",
    name: "Hotspot Shield",
    appStoreName: "VPN Hotspot Shield: Secure VPN",
    developer: "AnchorFree, LLC",
    logo: "/images/vpn-logos/hotspotshield.jpg",
    rating: 4.6,
    ratingCount: 359328,
    summary:
      "A long-established name with a free tier and the joint-longest refund window here. The network is smaller than the top picks, but the Mac app is simple and quick to set up.",
    servers: "1,800+",
    countries: "80+",
    devices: "10",
    refund: "45 days",
    priceFrom: "$2.99",
    noLogs: true,
    streaming: "Yes",
    highlights: [
      "1,800+ servers · 80+ countries",
      "10 devices per account",
      "45-day money-back guarantee",
    ],
    url: "https://www.hotspotshield.com",
  },
];

/** Our pick first, then the ranked alternatives — used by the table and JSON-LD. */
export const allProviders: VpnProvider[] = [ourPick, ...alternatives];

/**
 * Every competitor we display, as prose. Used by the footer and the disclaimer page
 * so a trademark notice can never fall out of sync with the ranking.
 */
export const trademarkList = alternatives
  .map((p) => p.name)
  .reduce(
    (acc, name, i, all) =>
      i === 0 ? name : i === all.length - 1 ? `${acc} and ${name}` : `${acc}, ${name}`,
    ""
  );

export const criteria: Criterion[] = [
  {
    title: "Privacy",
    description:
      "Whether the no-logs policy has been confirmed by an independent audit or tested in court — not just stated — and which country the provider answers to. This carries the most weight.",
  },
  {
    title: "Network",
    description:
      "Published server and country coverage, and whether the provider publishes a real figure at all rather than a rounded-up location count.",
  },
  {
    title: "Mac support",
    description:
      "A native macOS app that runs on Apple Silicon, with the features Mac users expect: a kill switch, split tunnelling and leak protection.",
  },
  {
    title: "Value",
    description:
      "The entry price, how many devices one subscription covers, and how long you have to change your mind and claim a refund.",
  },
];

export const guideFaq: FAQItem[] = [
  {
    question: "What is the best free VPN for Mac?",
    answer:
      "If you want a free VPN, VPNFast (our own app) has a free tier with no sign-up, and Proton VPN offers a strong free plan too. Free plans suit everyday browsing and public Wi-Fi; paid plans add more servers and streaming.",
  },
  {
    question: "Do these VPNs work on Apple Silicon (M1/M2/M3)?",
    answer:
      "Yes — all the VPNs on this page run on Apple Silicon and Intel Macs. Check each provider's macOS requirements before installing.",
  },
  {
    question: "Are free VPNs safe?",
    answer:
      "A free VPN is safe when the provider has a clear no-logs policy and doesn't sell your data. Prefer VPNs on the Mac App Store and with audited privacy.",
  },
  {
    question: "Which VPN is cheapest for Mac?",
    answer:
      "On long-term plans, Private Internet Access is the cheapest paid option here at $2.03 a month, followed by CyberGhost and Surfshark. For free use, VPNFast and Proton VPN both have no-cost tiers.",
  },
];
