All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dsl.UrlButtonsBuilder.kt Maven / Gradle / Ivy

package dev.inmo.tgbotapi.keyboards.lib.dsl

import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.keyboards.lib.KeyboardBuilder
import dev.inmo.tgbotapi.utils.RowBuilder

fun  RowBuilder>.url(
    textBuilder: suspend BC.() -> String,
    urlBuilder: suspend BC.() -> String
) = +KeyboardBuilder.Button.URL(
    textBuilder = textBuilder,
    urlBuilder = urlBuilder
)


fun  RowBuilder>.url(
    textBuilder: suspend BC.() -> String,
    url: String,
) = url(
    textBuilder = textBuilder,
    urlBuilder = { url }
)


fun  RowBuilder>.url(
    text: String,
    urlBuilder: suspend BC.() -> String
) = url(
    textBuilder = { text },
    urlBuilder = urlBuilder
)


fun  RowBuilder>.url(
    text: String,
    url: String
) = url({ text }) { url }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy