// // EmptyStateView.swift // Zyquo Cloud // // Author: Simon-Pierre Boucher // Mail: contact@spboucher.ai // // Empty chat state: brand glyph, greeting, four suggested prompt cards, and // the model chip — intentional and beautiful, never blank. // import SwiftUI struct EmptyStateView: View { let model: AIModel? var onSelectModel: (AIModel) -> Void var onSuggestion: (String) -> Void private static let suggestions: [(symbol: String, title: String, prompt: String)] = [ ("lightbulb", "Explain something", "Explain how transformer attention works, with a concrete example."), ("chevron.left.forwardslash.chevron.right", "Review my code", "Review this code for bugs and suggest improvements:\n\n"), ("doc.text", "Summarize a document", "Summarize the key points of the following document:\n\n"), ("globe", "Translate", "Translate the following text to French, keeping the tone natural:\n\n"), ] var body: some View { VStack(spacing: ZyquoSpacing.lg) { Spacer() CloudZGlyph(size: 88) VStack(spacing: ZyquoSpacing.xxs) { Text("Welcome to Zyquo Cloud") .font(ZyquoFont.title) .foregroundStyle(ZyquoColor.textPrimary) Text("Your keys, every cloud model, one beautiful chat.") .font(ZyquoFont.body()) .foregroundStyle(ZyquoColor.textSecondary) } ModelChipView(model: model, onSelect: onSelectModel) LazyVGrid( columns: [GridItem(.flexible()), GridItem(.flexible())], spacing: ZyquoSpacing.sm ) { ForEach(Self.suggestions, id: \.title) { suggestion in Button { onSuggestion(suggestion.prompt) } label: { HStack(spacing: ZyquoSpacing.xs) { Image(systemName: suggestion.symbol) .font(.system(size: 14)) .foregroundStyle(ZyquoColor.accent) .frame(width: 20) Text(suggestion.title) .font(ZyquoFont.body(size: 13)) .foregroundStyle(ZyquoColor.textPrimary) Spacer(minLength: 0) } .padding(ZyquoSpacing.sm) .background( RoundedRectangle(cornerRadius: ZyquoRadius.medium, style: .continuous) .fill(ZyquoColor.surface) .overlay( RoundedRectangle(cornerRadius: ZyquoRadius.medium, style: .continuous) .strokeBorder(ZyquoColor.border, lineWidth: ZyquoMetrics.hairline) ) ) .contentShape(Rectangle()) } .buttonStyle(PressableButtonStyle()) } } .frame(maxWidth: 460) Spacer() Spacer() } .frame(maxWidth: .infinity, maxHeight: .infinity) .background(ZyquoColor.background) } }