// // Copyright 2021-2024 New Vector Ltd. // // SPDX-License-Identifier: AGPL-3.0-only // Please see LICENSE in the repository root for full details. // import SwiftUI struct PollEditForm: View { // MARK: - Properties // MARK: Private @Environment(\.theme) private var theme: ThemeSwiftUI // MARK: Public @ObservedObject var viewModel: PollEditFormViewModel.Context var body: some View { NavigationView { GeometryReader { proxy in ScrollView { VStack(alignment: .leading, spacing: 32.0) { PollEditFormTypePicker(selectedType: $viewModel.type) // bwi (#4483) Adds a boolean shoparticpants to the view models, the event and the view if BWIBuildSettings.shared.bwiPollShowParticipantsToggle { PollEditFormParticipationToggle(showParticipants: $viewModel.showParticipants) } VStack(alignment: .leading, spacing: 16.0) { Text(VectorL10n.pollEditFormPollQuestionOrTopic) .font(theme.fonts.title3SB) .foregroundColor(theme.colors.primaryContent) VStack(alignment: .leading, spacing: 8.0) { Text(VectorL10n.pollEditFormQuestionOrTopic) .font(theme.fonts.subheadline) .foregroundColor(theme.colors.primaryContent) MultilineTextField(VectorL10n.pollEditFormInputPlaceholder, text: $viewModel.question.text) } } VStack(alignment: .leading, spacing: 16.0) { Text(VectorL10n.pollEditFormCreateOptions) .font(theme.fonts.title3SB) .foregroundColor(theme.colors.primaryContent) ForEach(0..