PaywallModels.swift 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import Foundation
  2. enum PaywallPlan: String, CaseIterable, Identifiable {
  3. case monthly
  4. case yearly
  5. case lifetime
  6. var id: String { rawValue }
  7. var title: String {
  8. switch self {
  9. case .monthly: "Monthly"
  10. case .yearly: "Yearly"
  11. case .lifetime: "Lifetime"
  12. }
  13. }
  14. var subtitle: String {
  15. switch self {
  16. case .monthly: "Billed every month"
  17. case .yearly: "Save 42%. Billed once per year."
  18. case .lifetime: "One-time payment. All future updates."
  19. }
  20. }
  21. var price: String {
  22. switch self {
  23. case .monthly: "$7.99"
  24. case .yearly: "$49.99"
  25. case .lifetime: "$79.99"
  26. }
  27. }
  28. var priceSuffix: String? {
  29. switch self {
  30. case .monthly: "/mo"
  31. case .yearly: "/yr"
  32. case .lifetime: nil
  33. }
  34. }
  35. var isBestValue: Bool {
  36. self == .yearly
  37. }
  38. var features: [String] {
  39. switch self {
  40. case .monthly, .yearly:
  41. [
  42. "Unlimited AI Generations",
  43. "Post Generator & Title Optimizer",
  44. "Comment Writer with smart replies",
  45. ]
  46. case .lifetime:
  47. [
  48. "Pay once, use forever",
  49. "Priority Support",
  50. "Multi-device Sync",
  51. ]
  52. }
  53. }
  54. }
  55. struct PaywallFeature: Identifiable {
  56. let id = UUID()
  57. let title: String
  58. let systemImage: String
  59. }
  60. enum PaywallContent {
  61. static let title = "Unlock Full Pro Power"
  62. static let subtitle = "Generate unlimited posts, optimize titles, and craft smarter replies with advanced AI."
  63. static let includedSectionTitle = "Everything included in Premium"
  64. static let features: [PaywallFeature] = [
  65. PaywallFeature(title: "Unlimited AI Generations", systemImage: "sparkles"),
  66. PaywallFeature(title: "Post Generator", systemImage: "square.and.pencil"),
  67. PaywallFeature(title: "Title Optimizer", systemImage: "textformat.size"),
  68. PaywallFeature(title: "Comment Writer", systemImage: "bubble.left.and.bubble.right.fill"),
  69. PaywallFeature(title: "Custom AI Prompts", systemImage: "wand.and.stars"),
  70. PaywallFeature(title: "Post Analytics", systemImage: "chart.bar.fill"),
  71. ]
  72. }