package mg.dot.feufaro.solfa

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

@Composable
fun GridActionMenu(
    onAddMeasureRight: () -> Unit,
    onDeleteMeasure: () -> Unit,
) {
    Column {
        Row {
            FilledTonalButton(
                onClick = {
                    onAddMeasureRight()
                },
                colors = ButtonDefaults.filledTonalButtonColors(
                    containerColor = MaterialTheme.colorScheme.primary,
                    contentColor = MaterialTheme.colorScheme.onPrimary
                )
            ) {
                Icon(
                    modifier = Modifier.width(50.dp),
                    imageVector = Icons.Default.Add,
                    contentDescription = null
                )
            }
        }
        Row {
            OutlinedButton(
                onClick = {
                    onDeleteMeasure()
                },
                colors = ButtonDefaults.outlinedButtonColors(
                    contentColor = MaterialTheme.colorScheme.secondary
                ),
                border = BorderStroke(1.dp, MaterialTheme.colorScheme.secondary.copy(alpha = 0.5f))
            ) {
                Icon(
                    modifier = Modifier.width(50.dp),
                    imageVector = Icons.Default.Delete,
                    contentDescription = null
                )
            }
        }
    }
}