import { Schema } from 'effect';
import type { Environment } from '../../../vendor/cel-js/lib/index.js';
/**
 * One field-owned validation rule. Extracted so the config editor
 * (`ValidationRulesField`) can read the `when` / `message` `@title` +
 * `@description` straight off this struct — single source of truth, no
 * duplicated label/tooltip copy. `configure` only shapes the CEL environment;
 * the annotations are static, so a no-op `configure` is fine for metadata.
 */
export declare function validationRuleStruct(configure: (env: Environment) => void): Schema.Struct<{
    when: Schema.Schema<string, string, never>;
    warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
    message: Schema.refine<readonly [{
        readonly locale: "zh";
        readonly message: string;
    }, ...{
        readonly locale: "en" | "ja" | "ko";
        readonly message: string;
    }[]], Schema.TupleType<readonly [Schema.Struct<{
        locale: Schema.Literal<["zh"]>;
        message: Schema.SchemaClass<string, string, never>;
    }>], [Schema.Struct<{
        locale: Schema.Literal<["ja", "en", "ko"]>;
        message: Schema.SchemaClass<string, string, never>;
    }>]>>;
}>;
export declare function commonFieldFields(configure: (env: Environment) => void): {
    id: Schema.refine<string, typeof Schema.String>;
    displayName: Schema.optional<Schema.SchemaClass<string, string, never>>;
    hidden: Schema.optional<Schema.Schema<string, string, never>>;
    required: Schema.optional<Schema.Schema<string, string, never>>;
    validations: Schema.optional<Schema.Array$<Schema.Struct<{
        when: Schema.Schema<string, string, never>;
        warning: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
        message: Schema.refine<readonly [{
            readonly locale: "zh";
            readonly message: string;
        }, ...{
            readonly locale: "en" | "ja" | "ko";
            readonly message: string;
        }[]], Schema.TupleType<readonly [Schema.Struct<{
            locale: Schema.Literal<["zh"]>;
            message: Schema.SchemaClass<string, string, never>;
        }>], [Schema.Struct<{
            locale: Schema.Literal<["ja", "en", "ko"]>;
            message: Schema.SchemaClass<string, string, never>;
        }>]>>;
    }>>>;
};
export declare const FIELD_ORIENTATIONS: readonly ["vertical", "floating"];
export type FieldOrientation = typeof FIELD_ORIENTATIONS[number];
export declare const FIELD_ORIENTATION_OPTIONS: ReadonlyArray<{
    value: FieldOrientation;
    label: string;
}>;
export declare const FieldOrientationSchema: Schema.Literal<["vertical", "floating"]>;
export declare const DEFAULT_FIELD_ORIENTATION: FieldOrientation;
type ResultType = string | string[] | ((type: string) => boolean);
/**
 * The two ways a field's value can be derived from a CEL expression. They are
 * mutually exclusive — a field carries at most one `derived` config, tagged
 * with one of these modes.
 *
 * - `formula` — the field is read-only; its value is always the expression's
 *   result, recomputed when dependencies change.
 * - `prefill` — the field stays editable; the expression fills it only while
 *   the user has not touched it. A manual edit (an explicit clear included)
 *   takes over for good.
 */
export declare const DERIVED_MODES: readonly ["formula", "prefill"];
export type DerivedMode = typeof DERIVED_MODES[number];
export declare const DERIVED_MODE_LABELS: Readonly<Record<DerivedMode, string>>;
/**
 * Schema for a field's optional `derived` config — a `{ mode, expression }`
 * tagged struct shared by every input field type. Mutual exclusion of the two
 * modes is structural: one slot, one mode. `resultType` constrains the CEL
 * expression to the field's own value type, exactly as the field's other
 * expression schemas do.
 */
export declare function derivedField(configure: (env: Environment) => void, resultType: ResultType): Schema.optional<Schema.Struct<{
    mode: Schema.Literal<["formula", "prefill"]>;
    expression: Schema.Schema<string, string, never>;
}>>;
export {};
