import SwiftUI

struct LocalizedPostDetailView: View {

    @ObservedObject
    var post: LocalizedPost

    var body: some View {
        VStack(alignment: .leading) {
            OptionalStringPropertyView(
                title: "Preview Title",
                text: $post.linkPreviewTitle,
                prompt: post.title,
                footer: "The title to use for the post when linking to it")

            OptionalImagePropertyView(
                title: "Preview Image",
                selectedImage: $post.linkPreviewImage,
                footer: "The image to show for previews of this post")

            OptionalTextFieldPropertyView(
                title: "Preview Description",
                text: $post.linkPreviewDescription,
                footer: "The description to show in previews of the post")
        }
    }
}
