import type { EntityManager } from "../../data";
import type { Static } from "../../core/utils";
import { Field, type TActionContext } from "./Field";
import * as tb from "@sinclair/typebox";
export declare const textFieldConfigSchema: tb.TObject<{
    default_value: tb.TOptional<tb.TIntersect<[tb.TString, tb.TAny]>>;
    minLength: tb.TOptional<tb.TNumber>;
    maxLength: tb.TOptional<tb.TNumber>;
    pattern: tb.TOptional<tb.TString>;
    html_config: tb.TOptional<tb.TObject<{
        element: tb.TOptional<tb.TString>;
        props: tb.TOptional<tb.TObject<{}>>;
    }>>;
    required: tb.TOptional<tb.TBoolean>;
    description: tb.TOptional<tb.TString>;
    label: tb.TOptional<tb.TString>;
    fillable: tb.TOptional<tb.TUnion<[tb.TBoolean, tb.TArray<tb.TUnsafe<"create" | "read" | "update" | "delete">>]>>;
    hidden: tb.TOptional<tb.TUnion<[tb.TBoolean, tb.TArray<tb.TUnsafe<"form" | "table" | "create" | "read" | "update" | "delete" | "submit">>]>>;
    virtual: tb.TOptional<tb.TBoolean>;
}>;
export type TextFieldConfig = Static<typeof textFieldConfigSchema>;
export declare class TextField<Required extends true | false = false> extends Field<TextFieldConfig, string, Required> {
    readonly type = "text";
    protected getSchema(): tb.TObject<{
        default_value: tb.TOptional<tb.TIntersect<[tb.TString, tb.TAny]>>;
        minLength: tb.TOptional<tb.TNumber>;
        maxLength: tb.TOptional<tb.TNumber>;
        pattern: tb.TOptional<tb.TString>;
        html_config: tb.TOptional<tb.TObject<{
            element: tb.TOptional<tb.TString>;
            props: tb.TOptional<tb.TObject<{}>>;
        }>>;
        required: tb.TOptional<tb.TBoolean>;
        description: tb.TOptional<tb.TString>;
        label: tb.TOptional<tb.TString>;
        fillable: tb.TOptional<tb.TUnion<[tb.TBoolean, tb.TArray<tb.TUnsafe<"create" | "read" | "update" | "delete">>]>>;
        hidden: tb.TOptional<tb.TUnion<[tb.TBoolean, tb.TArray<tb.TUnsafe<"form" | "table" | "create" | "read" | "update" | "delete" | "submit">>]>>;
        virtual: tb.TOptional<tb.TBoolean>;
    }>;
    getHtmlConfig(): any;
    /**
     * Transform value after retrieving from database
     * @param value
     */
    transformRetrieve(value: string): string | null;
    transformPersist(_value: any, em: EntityManager<any>, context: TActionContext): Promise<string | undefined>;
    toJsonSchema(): tb.TString | tb.TOptional<tb.TString>;
    toType(): {
        type: string;
        required?: boolean | [boolean, boolean, boolean];
        fillable?: boolean | [boolean, boolean, boolean];
        comment?: string;
        import?: {
            package: string;
            name: string;
        }[];
    };
}
