Files
Reflect/Shared/Models/PersonalityPackable.swift
2022-02-26 13:19:19 -06:00

108 lines
2.5 KiB
Swift

//
// NotificationTitles.swift
// Feels (iOS)
//
// Created by Trey Tartt on 2/19/22.
//
import Foundation
protocol PersonalityPackable {
static var notificationTitles: [String] { get }
static var notificationBodyToday: [String] { get }
static var notificationBodyYesterday: [String] { get }
static var notificationBodyTwoDaysAgo: [String] { get }
static var title: String { get }
}
enum PersonalityPack: Int, CaseIterable {
case Default
case Rude
func randomPushNotificationStrings() -> (title: String, body: String) {
switch self {
case .Default:
return (DefaultTitles.notificationTitles.randomElement()!, DefaultTitles.notificationBodyToday.randomElement()!)
case .Rude:
return (RudeTitles.notificationTitles.randomElement()!, RudeTitles.notificationBodyToday.randomElement()!)
}
}
func title() -> String {
switch self {
case .Default:
return DefaultTitles.title
case .Rude:
return RudeTitles.title
}
}
}
final class DefaultTitles: PersonalityPackable {
static var title = "Nice"
static var notificationTitles: [String] {
[
"How was your day",
"Don't forget to rate your day",
"Please rate your day"
]
}
static var notificationBodyToday: [String] {
[
"How was your day",
"Don't forget to rate your day",
"Please rate your day"
]
}
static var notificationBodyYesterday: [String] {
[
"How was your day",
"Don't forget to rate your day"
]
}
static var notificationBodyTwoDaysAgo: [String] {
[
"How was your day",
"Don't forget to rate your day"
]
}
}
final class RudeTitles: PersonalityPackable {
static var title = "Rude"
static var notificationTitles: [String] {
[
"Hey asshat",
"Hey lazy dickbag, "
]
}
static var notificationBodyToday: [String] {
[
"How the fuck was your day",
"tell me how your day was",
"rate your day"
]
}
static var notificationBodyYesterday: [String] {
[
"How was your day",
"Don't forget to rate your day"
]
}
static var notificationBodyTwoDaysAgo: [String] {
[
"How was your day",
"Don't forget to rate your day"
]
}
}