//
//  PodcastInfoDetail.swift
//  PodcastsApp
//
//  Created by BREUIL Yohann on 17/05/2023.
//

import SwiftUI

struct PodcastView: View {
    var body: some View {
        NavigationStack {
            List {
                VStack {
                    Image(uiImage: UIImage(named: "underscore_podcast")!)
                        .resizable()
                        .aspectRatio(contentMode: .fit)
                        .cornerRadius(5)
                    Text("Underscore")
                    Text("Micode")
                    Button(action: {}) {
                        HStack {
                            Image(systemName: "play.fill")
                            Text("Reprendre")
                        }
                    }
                    .clipShape(Rectangle())
                    .background(.gray)
                    .blur(radius: 0.5)
                    
                    List {
                        PodcastEpisode()
                        PodcastEpisode()
                        PodcastEpisode()
                    }
                }
                .toolbar {
                    HStack {
                        Button(action: {}) {
                            Image(systemName: "checkmark")
                        }
                        .clipShape(Circle())
                        
                        Button(action: {}) {
                            Image(systemName: "ellipsis")
                        }
                        .clipShape(Circle())
                    }
                }
            }
        }
    }
}

struct PodcastInfoDetail_Previews: PreviewProvider {
    static var previews: some View {
        Group {
            PodcastView()
            PodcastView().preferredColorScheme(.dark)
        }
        
    }
}
