2024-05-17 12:22:00 +00:00
|
|
|
import AppIntents
|
|
|
|
import WidgetKit
|
|
|
|
|
|
|
|
struct AccountWidgetConfiguration: WidgetConfigurationIntent {
|
2024-06-26 09:06:50 +00:00
|
|
|
static let title: LocalizedStringResource = "Account Widget Configuration"
|
2024-05-17 12:22:00 +00:00
|
|
|
static let description = IntentDescription("Choose the account for this widget")
|
|
|
|
|
|
|
|
@Parameter(title: "Account")
|
|
|
|
var account: AppAccountEntity
|
|
|
|
}
|
|
|
|
|
|
|
|
extension AccountWidgetConfiguration {
|
|
|
|
static var previewAccount: AccountWidgetConfiguration {
|
|
|
|
let intent = AccountWidgetConfiguration()
|
|
|
|
intent.account = .init(account: .init(server: "Test", accountName: "Test account"))
|
|
|
|
return intent
|
|
|
|
}
|
|
|
|
}
|