-
Notifications
You must be signed in to change notification settings - Fork 11
/
DeveloperOptions.kt
28 lines (24 loc) · 1.04 KB
/
DeveloperOptions.kt
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
package com.kernel.finch.components.special
import androidx.annotation.DrawableRes
import com.kernel.finch.common.contracts.component.Component
import com.kernel.finch.common.models.Text
import com.kernel.finch.components.Label
data class DeveloperOptions(
val text: Text = Text.CharSequence(DEFAULT_TEXT),
val shouldOpenInNewTask: Boolean = DEFAULT_SHOULD_OPEN_IN_NEW_TASK,
val type: Label.Type = DEFAULT_TYPE,
@DrawableRes val icon: Int? = DEFAULT_ICON,
val isEnabled: Boolean = DEFAULT_IS_ENABLED,
val onButtonPressed: () -> Unit = DEFAULT_ON_BUTTON_PRESSED
) : Component<DeveloperOptions> {
override val id: String = ID
companion object {
const val ID = "developerOptions"
private const val DEFAULT_TEXT = "Developer options"
private const val DEFAULT_SHOULD_OPEN_IN_NEW_TASK = false
private val DEFAULT_TYPE = Label.Type.BUTTON
private val DEFAULT_ICON: Int? = null
private const val DEFAULT_IS_ENABLED = true
private val DEFAULT_ON_BUTTON_PRESSED: () -> Unit = {}
}
}