import Foundation enum PageState: String { /** Generate the page, and show it in overviews of the parent. */ case standard /** Generate the page, but don't provide links in overviews. */ case draft /** Generate the page, but don't include it in overviews of the parent. */ case hide } extension PageState { var isShownInOverview: Bool { switch self { case .standard, .draft: return true case .hide: return false } } var hasThumbnailLink: Bool { switch self { case .standard: return true case .draft: return false case .hide: return false } } }