package com.example.wabi.view.components.buttons

import android.annotation.SuppressLint
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import com.example.wabi.ui.theme.WabiTheme
import com.example.wabi.view.components.texts.AccentText

//функция, создающая кнопку в виде сслыки (подчёркнутого текста)
@Composable
fun ButtonLink(
    onClick: () -> Unit,
    textContent: String,
    colorContent: Color = WabiTheme.colors.mainColor,
    @SuppressLint("ModifierParameter") modifier: Modifier = Modifier,
    modifierContetnt: Modifier = Modifier,
    enabled: Boolean = true
): Unit {
    Button(
        onClick = onClick, colors = ButtonDefaults.buttonColors(
            contentColor = colorContent, containerColor = Color.Transparent
        ), modifier = modifier, enabled = enabled
    ) {
        AccentText(
            text = textContent,
            modifier = modifierContetnt,
            textAlign = TextAlign.Center,
            isUnderline = true,
            color = colorContent
        )
    }
}