//package com.syaroful.agrilinkvocpro.control_feature.page
//
//import android.content.res.Configuration.UI_MODE_NIGHT_YES
//import androidx.compose.foundation.layout.Arrangement
//import androidx.compose.foundation.layout.Column
//import androidx.compose.foundation.layout.Spacer
//import androidx.compose.foundation.layout.fillMaxSize
//import androidx.compose.foundation.layout.height
//import androidx.compose.foundation.layout.padding
//import androidx.compose.material3.MaterialTheme
//import androidx.compose.material3.Scaffold
//import androidx.compose.material3.Switch
//import androidx.compose.material3.Text
//import androidx.compose.runtime.Composable
//import androidx.compose.runtime.collectAsState
//import androidx.compose.runtime.getValue
//import androidx.compose.ui.Alignment
//import androidx.compose.ui.Modifier
//import androidx.compose.ui.tooling.preview.Preview
//import androidx.compose.ui.unit.dp
//import androidx.lifecycle.viewmodel.compose.viewModel
//import com.syaroful.agrilinkvocpro.control_feature.presentation.control.ControlViewModel
//
//@Composable
//fun ControlScreen(
//    modifier: Modifier = Modifier,
//    relayState: Boolean,
//    onRelayStateChange: (Boolean) -> Unit
//) {
//    Scaffold { innerPadding ->
//        Column(
//            modifier = Modifier
//                .fillMaxSize()
//                .padding(innerPadding)
//                .padding(24.dp),
//            verticalArrangement = Arrangement.Center,
//            horizontalAlignment = Alignment.CenterHorizontally
//        ) {
//            Text(text = "Kontrol Relay", style = MaterialTheme.typography.headlineMedium)
//
//            Spacer(modifier = Modifier.height(24.dp))
//
//            Switch(
//                checked = relayState,
//                onCheckedChange = { isChecked ->
//                    onRelayStateChange(isChecked)
//                }
//            )
//        }
//    }
//}
//
//@Composable
//fun ControlScreenRoute(
//    modifier: Modifier = Modifier,
//    viewModel: ControlViewModel = viewModel()
//) {
//    val relayState by viewModel.relayState.collectAsState()
//
//    ControlScreen(
//        modifier = modifier,
//        relayState = relayState,
//        onRelayStateChange = { viewModel.setRelayState(it) }
//    )
//}
//
//@Preview(showBackground = true, name = "Light Mode")
//@Preview(showBackground = true, name = "Dark Mode", uiMode = UI_MODE_NIGHT_YES)
//@Composable
//fun ControlScreenPreview() {
//    ControlScreen(
//        relayState = false,
//        onRelayStateChange = {}
//    )
//}