package llc.arma.ble.app.ui.screen.password.view

import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Visibility
import androidx.compose.material.icons.rounded.VisibilityOff
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.text.input.VisualTransformation
import androidx.compose.ui.unit.dp
import llc.arma.ble.app.ui.screen.password.ChangePasswordContract

@Composable
fun Loading(
    onEvent: (ChangePasswordContract.Event) -> Unit
) {

    Column(
        modifier = Modifier.padding(20.dp)
    ) {

        CircularProgressIndicator(
            strokeCap = StrokeCap.Round,
            modifier = Modifier.align(Alignment.CenterHorizontally)
        )

        Spacer(modifier = Modifier.height(20.dp))

        Box(
            modifier = Modifier
        ) {

            Surface(
                modifier = Modifier
                    .fillMaxWidth()
                    .height(50.dp),
                shape = CircleShape,
                color = MaterialTheme.colorScheme.surfaceVariant,
                onClick = {
                    onEvent(ChangePasswordContract.Event.OnNavigateUp)
                }
            ) {

                Box(modifier = Modifier.fillMaxSize()) {

                    Text(
                        modifier = Modifier.align(Alignment.Center),
                        color = MaterialTheme.colorScheme.onSurfaceVariant,
                        style = MaterialTheme.typography.labelLarge,
                        text = "Отменить"
                    )

                }

            }

        }

    }

}