package com.gh.gamecenter.setting.compose

import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.input.TextFieldValue

@Composable
fun Modifier.clickableWithoutRipple(onClick: () -> Unit): Modifier =
    clickable(indication = null, interactionSource = remember {
        MutableInteractionSource()
    }, onClick = onClick)


fun TextFieldValue.empty() = copy(text = "", selection = TextRange.Zero)
