// // AccountsPreferencesView.swift // macOS // // Created by Stuart Breckenridge on 27/6/20. // import SwiftUI import Account struct AccountPreferencesViewModel { // Sorted Accounts let sortedAccounts = AccountManager.shared.sortedAccounts // Available Accounts let accountTypes: [AccountType] = [.onMyMac, .feedbin, .feedly] var selectedAccount: Int? = 0 } struct AccountsPreferencesView: View { @State private var viewModel = AccountPreferencesViewModel() @State private var addAccountViewModel = AccountPreferencesViewModel() @State private var showAddAccountView: Bool = false @State private var hoverOnAdd: Bool = false @State private var hoverOnRemove: Bool = false var body: some View { VStack { HStack(alignment: .top, spacing: 10) { VStack(alignment: .leading) { List(selection: $viewModel.selectedAccount) { ForEach(0..