1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
package net.taler.anastasis.ui.backup
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.navigation.NavController
import androidx.navigation.compose.rememberNavController
import net.taler.anastasis.R
import net.taler.anastasis.Routes
import net.taler.anastasis.ui.reusable.pages.WizardPage
data class Continent(val name: String)
data class Country(
val code: String,
val name: String,
val nameI18N: Map<String, String>,
val currency: String,
)
@Composable
fun BackupCountryScreen(
navController: NavController,
continents: List<Continent>? = null,
countries: List<Country>? = null,
onSelectContinent: (continent: Continent) -> Unit,
onSelectCountry: (country: Country) -> Unit,
) {
WizardPage(
title = stringResource(R.string.backup_country_title),
navigationIcon = {
IconButton(onClick = {
navController.navigate(Routes.Home.route)
}) {
Icon(Icons.Default.ArrowBack, "back")
}
},
showPrev = false,
onNextClicked = {},
) {
}
}
@Composable
@Preview
fun BackupCountryScreenPreview() {
val navController = rememberNavController()
BackupCountryScreen(
navController = navController,
onSelectContinent = {},
onSelectCountry = {}
)
}
|