import SwiftUI

public struct MadlibsLayoutView<Content: View>: View {
    let title: String
    let subtitle: String?
    let content: () -> Content

    public init(title: String, subtitle: String? = nil, @ViewBuilder content: @escaping () -> Content) {
        self.title = title
        self.subtitle = subtitle
        self.content = content
    }

    public var body: some View {
        VStack(spacing: 16) {
            MadlibsTitleView(text: title, subtitle: subtitle)
                .padding(.top, 24)
                .padding(.bottom, 16)
            content()
            Spacer()
        }
    }
}
