//
//  CreatorCommunityNoPostsItemView.swift
//  SodaLive
//
//  Created by klaus on 2023/12/14.
//

import SwiftUI

struct CreatorCommunityNoPostsItemView: View {
    
    let onSuccess: () -> Void
    
    var body: some View {
        VStack(spacing: 10.3) {
            CreatorCommunityWriteItemView()
            
            Text("게시물 등록")
                .font(.custom(Font.bold.rawValue, size: 14.7))
                .foregroundColor(Color(hex: "eeeeee"))
            
            Text("게시 후에 게시물이 여기에 표시되고\n커뮤니티에 공개됩니다.")
                .font(.custom(Font.medium.rawValue, size: 12))
                .foregroundColor(Color(hex: "777777"))
                .fixedSize(horizontal: false, vertical: true)
                .multilineTextAlignment(.center)
        }
        .padding(.vertical, 16.7)
        .frame(maxWidth: .infinity)
        .background(Color(hex: "222222"))
        .cornerRadius(10.3)
        .contentShape(Rectangle())
        .onTapGesture {
            AppState.shared.setAppStep(step: .creatorCommunityWrite(onSuccess: onSuccess))
        }
    }
}

struct CreatorCommunityNoPostsItemView_Previews: PreviewProvider {
    static var previews: some View {
        CreatorCommunityNoPostsItemView {}
    }
}
