import Foundation

enum OnboardingStep: Int, CaseIterable {
    case welcome
    case camera
    case photos
    case contacts
    case activation

    var index: Int { rawValue + 1 }

    var total: Int { Self.allCases.count }

    var isPermissionStep: Bool {
        switch self {
        case .camera, .photos, .contacts:
            true
        default:
            false
        }
    }

    var next: OnboardingStep? {
        guard let nextStep = Self(rawValue: rawValue + 1) else { return nil }
        return nextStep
    }
}
