import SwiftUI struct PostGridSearchHistoryView: View { @EnvironmentObject var settings: SettingsManager @Binding var selectedTab: Int @Binding var isPresented: Bool var body: some View { GenericListView( selectedTab: $selectedTab, isPresented: $isPresented, allowBookmarking: true, title: "Search History", emptyMessage: "No History", emptyIcon: "magnifyingglass", emptyDescription: "Recent searches will appear here.", removeAllMessage: "Are you sure you want to remove all searches? This action cannot be undone.", removeAllButtonText: "Remove All Searches", items: settings.searchHistory, removeAction: settings.removeSearchHistoryEntry, removeActionUUID: settings.removeSearchHistoryEntry ) { settings.searchHistory.removeAll() } } } #Preview { PostGridSearchHistoryView( selectedTab: .constant(0), isPresented: .constant(true) ) .environmentObject(SettingsManager()) .environmentObject(BooruManager(.safebooru)) }