mirror of
https://github.com/fmtr/haco.git
synced 2026-10-26 02:48:54 -04:00
29 lines
574 B
Python
29 lines
574 B
Python
from dataclasses import dataclass
|
|
from enum import StrEnum
|
|
|
|
from haco.control import Control
|
|
from haco.utils import ConvertersString
|
|
|
|
|
|
class Mode(StrEnum):
|
|
TEXT = "text"
|
|
PASSWORD = "password"
|
|
|
|
|
|
@dataclass(kw_only=True)
|
|
class Text(Control):
|
|
DATA = dict(
|
|
platform='text'
|
|
)
|
|
converters = ConvertersString
|
|
|
|
pattern: str | None = None
|
|
min: int | None = None
|
|
max: int | None = None
|
|
mode: Mode = Mode.TEXT
|
|
|
|
def command(self, value):
|
|
raise NotImplementedError()
|
|
|
|
def state(self, value):
|
|
raise NotImplementedError()
|