package com.example.ui.screens import androidx.compose.animation.* import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.* import androidx.compose.material3.* import androidx.compose.runtime.* import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.testTag import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.window.Dialog import com.example.data.CashDepositRequest import com.example.data.UserWallet import com.example.ui.PortalViewModel import com.example.ui.theme.* import java.util.* @OptIn(ExperimentalMaterial3Api::class) @Composable fun CashAgentPortalView( viewModel: PortalViewModel, userWallet: UserWallet, allDepositRequests: List ) { val isAgent = userWallet.isAgent val appStatus = userWallet.agentApplicationStatus Column( modifier = Modifier .fillMaxSize() .background(Obsidian) ) { // App Header Banner Surface( color = DarkGreyGlassElevated, modifier = Modifier.fillMaxWidth() ) { Row( modifier = Modifier .fillMaxWidth() .padding(horizontal = 16.dp, vertical = 14.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.SpaceBetween ) { Column { Row(verticalAlignment = Alignment.CenterVertically) { Icon( imageVector = Icons.Default.CurrencyExchange, contentDescription = "agent", tint = BrandGold, modifier = Modifier.size(22.dp) ) Spacer(modifier = Modifier.width(8.dp)) Text( text = "Airtm Cash Agent Console", style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold, color = TextPrimary ) } Text( text = "Decentralized cash-in/cash-out settlement node", style = MaterialTheme.typography.bodySmall, color = TextSecondary ) } Surface( shape = RoundedCornerShape(6.dp), color = if (isAgent) Color.Green.copy(0.12f) else BrandGold.copy(0.12f), contentColor = if (isAgent) Color.Green else BrandGold ) { Text( text = if (isAgent) "LICENSED AGENT" else "UNREGISTERED", style = MaterialTheme.typography.labelSmall, fontWeight = FontWeight.ExtraBold, modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp) ) } } } Divider(color = DarkGreyGlass) if (!isAgent) { // Unregistered state: show registration screen AgentRegistrationForm(viewModel = viewModel, currentWallet = userWallet) } else { // Registered state: show the Cash register console val agentRequests = allDepositRequests.filter { it.agentId == userWallet.userId } AgentConsoleDashboard( viewModel = viewModel, userWallet = userWallet, depositRequests = agentRequests ) } } } @Composable fun AgentRegistrationForm( viewModel: PortalViewModel, currentWallet: UserWallet ) { var phoneInput by remember { mutableStateOf(currentWallet.agentPhone.ifEmpty { "+880 1712-345678" }) } var nidInput by remember { mutableStateOf(currentWallet.agentNid.ifEmpty { "1029384756" }) } var locationInput by remember { mutableStateOf(currentWallet.agentLocation.ifEmpty { "Gulshan Outlet, Dhaka" }) } var agreeToTerms by remember { mutableStateOf(true) } var feedbackMsg by remember { mutableStateOf(null) } LazyColumn( modifier = Modifier .fillMaxSize() .padding(16.dp), verticalArrangement = Arrangement.spacedBy(16.dp) ) { item { Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlassElevated), border = BorderStroke(1.dp, BrandGold.copy(0.2f)) ) { Column(modifier = Modifier.padding(16.dp)) { Text( text = "Become an Authorized Airtm Cash Agent", style = MaterialTheme.typography.titleMedium, color = BrandGold, fontWeight = FontWeight.Bold ) Spacer(modifier = Modifier.height(8.dp)) Text( text = "Cash agents act as local escrow banks. You earn a lucrative 5% net commission on every BDT cash-in transaction you process. Deposits are backed by your platform security lock.", style = MaterialTheme.typography.bodySmall, color = TextPrimary ) } } } // Status Indicators item { val statusColor = when (currentWallet.agentApplicationStatus) { "pending" -> BrandGold "rejected" -> CoralRed "approved" -> Color.Green else -> TextSecondary } Card( colors = CardDefaults.cardColors(containerColor = statusColor.copy(0.08f)), border = BorderStroke(1.dp, statusColor.copy(0.3f)) ) { Row( modifier = Modifier .fillMaxWidth() .padding(14.dp), verticalAlignment = Alignment.CenterVertically ) { Icon( imageVector = when (currentWallet.agentApplicationStatus) { "pending" -> Icons.Default.PendingActions "rejected" -> Icons.Default.Cancel "approved" -> Icons.Default.CheckCircle else -> Icons.Default.Info }, contentDescription = "status", tint = statusColor, modifier = Modifier.size(24.dp) ) Spacer(modifier = Modifier.width(12.dp)) Column { Text( text = "Current License Status: ${currentWallet.agentApplicationStatus.uppercase()}", fontWeight = FontWeight.Bold, color = statusColor, style = MaterialTheme.typography.bodySmall ) Text( text = when (currentWallet.agentApplicationStatus) { "pending" -> "Pending Admin Approval. Go to the 'Admin Portal' top bar tab, hover over 'Agents' card, and click 'Approve License' to unlock Agent Dashboard." "rejected" -> "Your application was rejected. Please review details or apply again with valid NID." "approved" -> "Approved! You are fully unlocked." else -> "Not applied yet. Please populate your business details below to request license." }, style = MaterialTheme.typography.labelSmall, color = TextSecondary ) } } } } if (currentWallet.agentApplicationStatus != "pending") { item { Text( text = "Operator Configuration Details", style = MaterialTheme.typography.titleSmall, color = TextPrimary, fontWeight = FontWeight.Bold ) } item { OutlinedTextField( value = phoneInput, onValueChange = { phoneInput = it }, label = { Text("Active agent bKash/Nagad/Phone Number") }, colors = TextFieldDefaults.colors( focusedContainerColor = DarkGreyGlass, unfocusedContainerColor = DarkGreyGlass, focusedTextColor = TextPrimary, unfocusedTextColor = TextPrimary ), modifier = Modifier.fillMaxWidth().testTag("agent_apply_phone"), singleLine = true ) } item { OutlinedTextField( value = nidInput, onValueChange = { nidInput = it }, label = { Text("National Identify Document (NID) / License Number") }, colors = TextFieldDefaults.colors( focusedContainerColor = DarkGreyGlass, unfocusedContainerColor = DarkGreyGlass, focusedTextColor = TextPrimary, unfocusedTextColor = TextPrimary ), modifier = Modifier.fillMaxWidth().testTag("agent_apply_nid"), singleLine = true ) } item { OutlinedTextField( value = locationInput, onValueChange = { locationInput = it }, label = { Text("Outlet Address / Geographic Location") }, colors = TextFieldDefaults.colors( focusedContainerColor = DarkGreyGlass, unfocusedContainerColor = DarkGreyGlass, focusedTextColor = TextPrimary, unfocusedTextColor = TextPrimary ), modifier = Modifier.fillMaxWidth().testTag("agent_apply_location"), singleLine = true ) } item { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.fillMaxWidth() ) { Checkbox( checked = agreeToTerms, onCheckedChange = { agreeToTerms = it }, colors = CheckboxDefaults.colors(checkedColor = BrandGold) ) Spacer(modifier = Modifier.width(8.dp)) Text( text = "I guarantee that I have sufficient capital (Min ৳10,000 BDT) to support cash withdrawals and deposits physically.", style = MaterialTheme.typography.labelSmall, color = TextSecondary ) } } item { Button( onClick = { if (phoneInput.isNotEmpty() && nidInput.isNotEmpty() && locationInput.isNotEmpty()) { viewModel.applyForCashAgent(phoneInput, nidInput, locationInput) feedbackMsg = "Filing contract sent. Waiting for superuser node clearance!" } else { feedbackMsg = "Please fill out all operational fields." } }, enabled = agreeToTerms, colors = ButtonDefaults.buttonColors(containerColor = BrandGold, contentColor = Color.Black), shape = RoundedCornerShape(10.dp), modifier = Modifier .fillMaxWidth() .height(48.dp) .testTag("apply_agent_submit_btn") ) { Text("Request License Authorization ⚡", fontWeight = FontWeight.Bold) } } } feedbackMsg?.let { msg -> item { Card(colors = CardDefaults.cardColors(containerColor = DarkGreyGlassElevated)) { Text( text = msg, color = BrandGold, modifier = Modifier.padding(12.dp), style = MaterialTheme.typography.bodySmall, textAlign = TextAlign.Center ) } } } } } @Composable fun AgentConsoleDashboard( viewModel: PortalViewModel, userWallet: UserWallet, depositRequests: List ) { var statusMessage by remember { mutableStateOf(null) } var showProofDialog by remember { mutableStateOf(null) } val withdrawals = viewModel.allWithdrawalsFlow.collectAsState(initial = emptyList()).value val agentWithdrawals = withdrawals.filter { it.agentId == userWallet.userId } LazyColumn( modifier = Modifier .fillMaxSize() .padding(16.dp), verticalArrangement = Arrangement.spacedBy(16.dp) ) { // Stats Cards Grid item { Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlassElevated), border = BorderStroke(1.dp, BrandGold.copy(0.15f)) ) { Column(modifier = Modifier.padding(16.dp)) { Text( text = "Agent Financial Overview", style = MaterialTheme.typography.titleSmall, color = BrandGold, fontWeight = FontWeight.Bold ) Spacer(modifier = Modifier.height(12.dp)) Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp) ) { Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlass), modifier = Modifier.weight(1f) ) { Column(modifier = Modifier.padding(12.dp)) { Text("Escrow Register BDT", fontSize = 10.sp, color = TextSecondary) Text( text = String.format(Locale.US, "৳%,.2f", userWallet.agentBalance), style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Black, color = BrandGold ) } } Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlass), modifier = Modifier.weight(1f) ) { Column(modifier = Modifier.padding(12.dp)) { Text("Commissions", fontSize = 10.sp, color = TextSecondary) Text( text = String.format(Locale.US, "৳%,.2f", userWallet.agentCommissionEarned), style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold, color = Color.Green ) } } } Spacer(modifier = Modifier.height(12.dp)) // Daily handled limit val limitMax = 100000.0 val currentHandled = userWallet.agentTotalCashCollected val progress = (currentHandled / limitMax).coerceIn(0.0, 1.0).toFloat() Column { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween ) { Text("Daily limit processed", fontSize = 10.sp, color = TextSecondary) Text("৳${currentHandled.toInt()} / ৳100,000 BDT", fontSize = 10.sp, color = TextPrimary, fontWeight = FontWeight.Bold) } Spacer(modifier = Modifier.height(4.dp)) LinearProgressIndicator( progress = progress, color = BrandGold, trackColor = Color.White.copy(0.08f), modifier = Modifier.fillMaxWidth().height(6.dp) ) } } } } // Action Status Bar statusMessage?.let { msg -> item { Card(colors = CardDefaults.cardColors(containerColor = BrandGold.copy(0.12f))) { Row( modifier = Modifier.padding(12.dp), verticalAlignment = Alignment.CenterVertically ) { Text( text = msg, color = TextPrimary, style = MaterialTheme.typography.bodySmall, modifier = Modifier.weight(1f) ) IconButton(onClick = { statusMessage = null }) { Icon(Icons.Default.Close, "close", tint = TextSecondary, modifier = Modifier.size(16.dp)) } } } } } // Pending deposit requests item { Text( text = "Secure Cash Settlement Orders (${depositRequests.size})", style = MaterialTheme.typography.titleMedium, color = TextPrimary, fontWeight = FontWeight.Bold ) } if (depositRequests.isEmpty()) { item { Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlass) ) { Column( modifier = Modifier.fillMaxWidth().padding(24.dp), horizontalAlignment = Alignment.CenterHorizontally ) { Icon(Icons.Default.Inbox, "inbox", tint = TextSecondary, modifier = Modifier.size(32.dp)) Spacer(modifier = Modifier.height(8.dp)) Text( text = "No pending cash-in requests for your node.", color = TextSecondary, style = MaterialTheme.typography.bodySmall, textAlign = TextAlign.Center ) Text( text = "Tip: Go to 'User App' -> click Wallet -> click 'Deposit Cash' to submit a test requested transfer to this agent!", color = BrandGold, style = MaterialTheme.typography.labelSmall, textAlign = TextAlign.Center, modifier = Modifier.padding(top = 8.dp) ) } } } } else { items(depositRequests) { req -> Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlassElevated), border = BorderStroke(1.dp, if (req.status == "PENDING") BrandGold.copy(0.3f) else Color.Transparent) ) { Column(modifier = Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Text( text = "Settlement Room #${req.id}", style = MaterialTheme.typography.bodyMedium, fontWeight = FontWeight.Bold, color = BrandGold ) Surface( shape = RoundedCornerShape(4.dp), color = when (req.status) { "APPROVED" -> Color.Green.copy(0.12f) "CONFIRMED" -> Color.Cyan.copy(0.12f) "PENDING" -> BrandGold.copy(0.12f) else -> CoralRed.copy(0.12f) }, contentColor = when (req.status) { "APPROVED" -> Color.Green "CONFIRMED" -> Color.Cyan "PENDING" -> BrandGold else -> CoralRed } ) { Text( text = req.status.uppercase(), style = MaterialTheme.typography.labelSmall, fontWeight = FontWeight.Bold, modifier = Modifier.padding(horizontal = 8.dp, vertical = 2.dp) ) } } Text("Client Name: ${req.userName} (${req.userId})", style = MaterialTheme.typography.bodySmall, color = TextPrimary) if (req.walletNumber.isNotEmpty()) { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(12.dp) ) { Text("📱 Wallet: ${req.walletNumber}", fontSize = 11.sp, color = TextSecondary) Text("🔑 Trx Last 4: *${req.trxLast4}", fontSize = 11.sp, color = BrandGold) } if (req.screenshot.isNotEmpty()) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier .fillMaxWidth() .background(Color.White.copy(0.04f), RoundedCornerShape(4.dp)) .padding(horizontal = 8.dp, vertical = 4.dp) ) { Icon(Icons.Default.Image, "img", tint = BrandGold, modifier = Modifier.size(12.dp)) Spacer(modifier = Modifier.width(4.dp)) Text("Proof: ${req.screenshot}", fontSize = 10.sp, color = TextPrimary) } } } Row( modifier = Modifier .fillMaxWidth() .background(DarkGreyGlass, RoundedCornerShape(8.dp)) .padding(10.dp), horizontalArrangement = Arrangement.SpaceBetween ) { Column { Text("Client Credits (In)", fontSize = 9.sp, color = TextSecondary) Text("৳${req.amount} BDT", fontWeight = FontWeight.Bold, color = TextPrimary) } Column(horizontalAlignment = Alignment.End) { Text("Your 5% Commission", fontSize = 9.sp, color = TextSecondary) Text("৳${req.commission} BDT", fontWeight = FontWeight.Bold, color = Color.Green) } } if (req.status == "PENDING") { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp) ) { Button( onClick = { viewModel.confirmCashCollection(req.id) { success, msg -> statusMessage = msg } }, colors = ButtonDefaults.buttonColors(containerColor = Color.Green, contentColor = Color.White), modifier = Modifier.weight(1.3f).height(36.dp).testTag("agent_release_funds_${req.id}"), shape = RoundedCornerShape(6.dp) ) { Text("Release Funds ✓", fontWeight = FontWeight.Bold, fontSize = 11.sp) } OutlinedButton( onClick = { statusMessage = "Deposit request declined offline." }, border = BorderStroke(1.dp, CoralRed), colors = ButtonDefaults.outlinedButtonColors(contentColor = CoralRed), modifier = Modifier.weight(1f).height(36.dp), shape = RoundedCornerShape(6.dp) ) { Text("Decline", fontSize = 11.sp) } } } else if (req.status == "CONFIRMED" || req.status == "APPROVED") { Button( onClick = { showProofDialog = req }, colors = ButtonDefaults.buttonColors(containerColor = BrandGold, contentColor = Color.Black), modifier = Modifier.fillMaxWidth().height(32.dp), shape = RoundedCornerShape(6.dp) ) { Icon(Icons.Default.Download, "down", modifier = Modifier.size(14.dp)) Spacer(modifier = Modifier.width(6.dp)) Text("Generate Audit Receipt", fontWeight = FontWeight.Bold, fontSize = 11.sp) } } } } } } // ----------------- WITHDRAWALS SECTION ----------------- item { Spacer(modifier = Modifier.height(8.dp)) Text( text = "Model Payout Settlements (${agentWithdrawals.size})", style = MaterialTheme.typography.titleMedium, color = TextPrimary, fontWeight = FontWeight.Bold ) } if (agentWithdrawals.isEmpty()) { item { Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlass) ) { Column( modifier = Modifier.fillMaxWidth().padding(24.dp), horizontalAlignment = Alignment.CenterHorizontally ) { Icon(Icons.Default.Payment, "payout", tint = TextSecondary, modifier = Modifier.size(32.dp)) Spacer(modifier = Modifier.height(8.dp)) Text( text = "No pending withdrawal payout orders assigned to your node.", color = TextSecondary, style = MaterialTheme.typography.bodySmall, textAlign = TextAlign.Center ) } } } } else { items(agentWithdrawals) { wt -> Card( colors = CardDefaults.cardColors(containerColor = DarkGreyGlassElevated), border = BorderStroke(1.dp, if (wt.status == "PENDING") BrandGold.copy(0.3f) else Color.Transparent) ) { Column(modifier = Modifier.padding(14.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) { Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Text( text = "Payout Order #${wt.id}", style = MaterialTheme.typography.bodyMedium, fontWeight = FontWeight.Bold, color = BrandGold ) Surface( shape = RoundedCornerShape(4.dp), color = when (wt.status) { "CONFIRMED" -> Color.Green.copy(0.12f) "SENT" -> Color.Cyan.copy(0.12f) "PENDING" -> BrandGold.copy(0.12f) else -> CoralRed.copy(0.12f) }, contentColor = when (wt.status) { "CONFIRMED" -> Color.Green "SENT" -> Color.Cyan "PENDING" -> BrandGold else -> CoralRed } ) { Text( text = wt.status.uppercase(), style = MaterialTheme.typography.labelSmall, fontWeight = FontWeight.Bold, modifier = Modifier.padding(horizontal = 8.dp, vertical = 2.dp) ) } } Text("Payee Model: ${wt.modelName} (Id: ${wt.modelId})", style = MaterialTheme.typography.bodySmall, color = TextPrimary) Text("Model Wallet Name: ${wt.name}", style = MaterialTheme.typography.labelMedium, color = TextSecondary) Text("Send Money To BDT: ${wt.walletNumber}", fontWeight = FontWeight.Bold, color = TextPrimary) Row( modifier = Modifier .fillMaxWidth() .background(DarkGreyGlass, RoundedCornerShape(8.dp)) .padding(10.dp), horizontalArrangement = Arrangement.SpaceBetween ) { Column { Text("Payout Amount", fontSize = 9.sp, color = TextSecondary) Text("৳${wt.amount} BDT", fontWeight = FontWeight.Bold, color = BrandGold) } } if (wt.status == "PENDING") { Button( onClick = { val simulatedProofFilename = "payout_receipt_order_${wt.id}.png" viewModel.agentUploadWithdrawalProof(wt.id, simulatedProofFilename) { success, msg -> statusMessage = msg } }, colors = ButtonDefaults.buttonColors(containerColor = Color.Green, contentColor = Color.Black), modifier = Modifier.fillMaxWidth().height(36.dp).testTag("agent_pay_model_${wt.id}"), shape = RoundedCornerShape(6.dp) ) { Icon(Icons.Default.Check, "confirm", modifier = Modifier.size(16.dp)) Spacer(modifier = Modifier.width(6.dp)) Text("Mark Paid & Send Screenshot Proof", fontWeight = FontWeight.Bold, fontSize = 11.sp) } } else if (wt.status == "SENT") { Row( modifier = Modifier .fillMaxWidth() .background(Color.White.copy(0.04f), RoundedCornerShape(4.dp)) .padding(8.dp), verticalAlignment = Alignment.CenterVertically ) { Icon(Icons.Default.CloudUpload, "upload", tint = Color.Green, modifier = Modifier.size(14.dp)) Spacer(modifier = Modifier.width(6.dp)) Text("Uploaded Payout Proof: ${wt.screenshot}", fontSize = 10.sp, color = TextSecondary) } } } } } } } if (showProofDialog != null) { val target = showProofDialog!! Dialog(onDismissRequest = { showProofDialog = null }) { Card( shape = RoundedCornerShape(16.dp), colors = CardDefaults.cardColors(containerColor = DarkGreyGlassElevated), modifier = Modifier.fillMaxWidth().padding(16.dp) ) { Column( modifier = Modifier.padding(20.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(12.dp) ) { Icon(Icons.Default.VerifiedUser, "verified", tint = Color.Green, modifier = Modifier.size(48.dp)) Text("Airtm Escrow Audit Receipt", fontWeight = FontWeight.Bold, style = MaterialTheme.typography.titleMedium, color = TextPrimary) Text("Transaction Reference: #${UUID.randomUUID().toString().substring(0, 8).uppercase()}", style = MaterialTheme.typography.labelSmall, color = TextSecondary) Divider(color = Color.White.copy(0.1f)) Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { Text("Settle Node:", color = TextSecondary, fontSize = 12.sp) Text(userWallet.name, color = TextPrimary, fontWeight = FontWeight.Bold, fontSize = 12.sp) } Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { Text("Released to User:", color = TextSecondary, fontSize = 12.sp) Text(target.userName, color = TextPrimary, fontWeight = FontWeight.Bold, fontSize = 12.sp) } Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { Text("Aggregated Cash In:", color = TextSecondary, fontSize = 12.sp) Text("৳${target.amount} BDT", color = BrandGold, fontWeight = FontWeight.Bold, fontSize = 12.sp) } Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { Text("Cleared Net Fee (5%):", color = TextSecondary, fontSize = 12.sp) Text("৳${target.commission} BDT", color = Color.Green, fontWeight = FontWeight.Bold, fontSize = 12.sp) } Spacer(modifier = Modifier.height(8.dp)) Button( onClick = { showProofDialog = null }, colors = ButtonDefaults.buttonColors(containerColor = BrandGold, contentColor = Color.Black), modifier = Modifier.fillMaxWidth() ) { Text("Download PDF & Close", fontWeight = FontWeight.Bold) } } } } } }