import { APITextInputComponent, ComponentType, TextInputStyle } from "@biscuitland/common"; import { OptionValuesLength } from ".."; import { BaseComponent } from "./BaseComponent"; export class ModalTextInput extends BaseComponent { constructor(data: Partial = {}) { super({ ...data, type: ComponentType.TextInput }); } setStyle(style: TextInputStyle): this { this.data.style = style; return this; } setLabel(label: string): this { this.data.label = label; return this; } setPlaceholder(placeholder: string): this { this.data.placeholder = placeholder; return this; } setLength({ max, min }: Partial): this { this.data.max_length = max; this.data.min_length = min; return this; } setCustomId(id: string): this { this.data.custom_id = id; return this; } setValue(value: string): this { this.data.value = value; return this; } setRequired(required = true): this { this.data.required = required; return this; } }