// // LiveRoomInfoHostView.swift // SodaLive // // Created by klaus on 2024/01/17. // import SwiftUI import Kingfisher struct LiveRoomInfoHostView: View { let title: String let totalDonationCan: Int let participantsCount: Int let isOnBg: Bool let isOnNotice: Bool let isOnMenuPan: Bool let isOnSignature: Bool let isShowMenuPanButton: Bool let creatorId: Int let creatorNickname: String let creatorProfileUrl: String let speakerList: [LiveRoomMember] let muteSpeakerList: [UInt] let activeSpeakerList: [UInt] let isAdult: Bool let onClickQuit: () -> Void let onClickToggleBg: () -> Void let onClickEdit: () -> Void let onClickProfile: (Int) -> Void let onClickNotice: () -> Void let onClickMenuPan: () -> Void let onClickTotalDonation: () -> Void let onClickParticipants: () -> Void let onClickToggleSignature: () -> Void var body: some View { ZStack { VStack(alignment: .leading, spacing: 13.3) { HStack(spacing: 5.3) { LiveRoomOverlayStrokeTextButton( text: "라이브 종료", textColor: Color.red, strokeColor: Color.red, strokeWidth: 1, strokeCornerRadius: 5.3 ) { onClickQuit() } Spacer() LiveRoomOverlayStrokeTextToggleButton( isOn: isOnSignature, onText: "시그 ON", onTextColor: Color.button, onStrokeColor: Color.button, offText: "시그 OFF", offTextColor: Color.graybb, offStrokeColor: Color.graybb, strokeWidth: 1, strokeCornerRadius: 5.3 ) { onClickToggleSignature() } LiveRoomOverlayStrokeTextToggleButton( isOn: isOnBg, onText: "배경 ON", onTextColor: Color.button, onStrokeColor: Color.button, offText: "배경 OFF", offTextColor: Color.graybb, offStrokeColor: Color.graybb, strokeWidth: 1, strokeCornerRadius: 5.3 ) { onClickToggleBg() } LiveRoomOverlayStrokeImageButton( imageName: "ic_edit", strokeColor: Color.graybb, strokeWidth: 1, strokeCornerRadius: 5.3 ) { onClickEdit() } } HStack(spacing: 8) { LiveRoomInfoCreatorView( roomTitle: title, creatorNickname: creatorNickname, creatorProfileUrl: creatorProfileUrl, isMute: muteSpeakerList.contains(UInt(creatorId)), isAdult: isAdult, isFollowing: false, isActiveSpeaker: activeSpeakerList.contains(UInt(creatorId)), isShowFollowingButton: false, onClickFollow: {}, onClickProfile: {} ) .frame(width: 180, alignment: .leading) Spacer() ForEach(0..