import { Schema } from 'effect';
import type { Environment } from '../../vendor/cel-js/lib/index.js';
import { type LocaleValue } from '../../share/locale.js';
export { getStructFieldDescription, getStructFieldTitle } from '../table/utils/schema-meta.js';
declare const KIND = "shwfed.component.page";
/**
 * Reserved sentinel instance id for the singleton page operation target. The
 * page is the outermost `ShwfedConfig` — there is only ever one per tree, so it
 * needs no stored, per-config id (which would force a migration of every
 * existing page config). The nil UUID can never collide with a block id:
 * `crypto.randomUUID()` always sets version-4 + variant bits, so it never
 * emits all-zeros. It also passes `Schema.UUID`'s lenient hex-layout regex, so
 * stored triggers targeting it decode cleanly.
 */
export declare const PAGE_TARGET_ID = "00000000-0000-0000-0000-000000000000";
/**
 * Capability manifest — type-level display info plus the operations the page
 * instance exposes to op-requests bubbled up from its descendants. Mirrors the
 * form/table manifests. `close` closes the surrounding browser tab/window; see
 * the runtime in `index.vue` for its deliberate-halt semantics.
 */
export declare const metadata: {
    readonly name: "页面";
    readonly icon: "fluent:document-20-regular";
    readonly operations: readonly [{
        readonly id: "close";
        readonly name: "关闭标签页";
        readonly icon: "fluent:dismiss-20-regular";
    }];
};
export declare function PageConfig(configure: (env: Environment) => void): Schema.Struct<{
    kind: Schema.tag<"shwfed.component.page">;
    title: Schema.optional<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>;
    }>]>>;
    style: Schema.optional<Schema.Schema<string, string, never>>;
    slot: Schema.refine<{
        readonly blocks: readonly any[];
        readonly layouts: readonly {
            readonly name: string;
            readonly layout: {
                readonly style?: string | undefined;
                readonly columns: number;
                readonly gap?: number | undefined;
                readonly rows?: number | undefined;
                readonly placements: {
                    readonly [x: string]: {
                        readonly area: readonly [readonly [number, number], readonly [number, number]];
                        readonly v?: "stretch" | "center" | "end" | "start" | undefined;
                        readonly h?: "stretch" | "center" | "end" | "start" | undefined;
                    };
                };
            };
            readonly media?: string | undefined;
        }[];
    }, Schema.Struct<{
        blocks: Schema.Array$<Schema.Schema<any, any, never>>;
        layouts: Schema.refine<readonly {
            readonly name: string;
            readonly layout: {
                readonly style?: string | undefined;
                readonly columns: number;
                readonly gap?: number | undefined;
                readonly rows?: number | undefined;
                readonly placements: {
                    readonly [x: string]: {
                        readonly area: readonly [readonly [number, number], readonly [number, number]];
                        readonly v?: "stretch" | "center" | "end" | "start" | undefined;
                        readonly h?: "stretch" | "center" | "end" | "start" | undefined;
                    };
                };
            };
            readonly media?: string | undefined;
        }[], Schema.Array$<Schema.Struct<{
            name: Schema.SchemaClass<string, string, never>;
            media: Schema.optional<Schema.Schema<string, string, never>>;
            layout: Schema.Struct<{
                columns: Schema.refine<number, Schema.filter<typeof Schema.Number>>;
                rows: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
                gap: Schema.optional<Schema.refine<number, Schema.filter<typeof Schema.Number>>>;
                style: Schema.optional<Schema.SchemaClass<string, string, never>>;
                placements: Schema.Record$<typeof Schema.String, Schema.Struct<{
                    area: Schema.refine<readonly [readonly [number, number], readonly [number, number]], Schema.Tuple2<Schema.Tuple2<Schema.filter<Schema.filter<typeof Schema.Number>>, Schema.filter<Schema.filter<typeof Schema.Number>>>, Schema.Tuple2<Schema.filter<Schema.filter<typeof Schema.Number>>, Schema.filter<Schema.filter<typeof Schema.Number>>>>>;
                    h: Schema.optional<Schema.Literal<["start", "center", "end", "stretch"]>>;
                    v: Schema.optional<Schema.Literal<["start", "center", "end", "stretch"]>>;
                }>>;
            }>;
        }>>>;
    }>>;
}>;
/**
 * Creation-time defaults for a fresh page. Mirrors the `defaultBlockBody`
 * seed used when a form block is added — newly-instantiated pages arrive
 * with one `默认` layout so the schema's `minItems(1)` invariant is met
 * and the editor opens on a usable canvas.
 */
export declare function defaults(): Pick<PageConfigValue, 'slot'>;
export declare function createPageConfig(body?: Partial<Omit<Schema.Schema.Type<ReturnType<typeof PageConfig>>, 'kind'>>): {
    style?: string | undefined;
    title?: readonly [{
        readonly locale: "zh";
        readonly message: string;
    }, ...{
        readonly locale: "en" | "ja" | "ko";
        readonly message: string;
    }[]] | undefined;
    slot: {
        readonly blocks: readonly any[];
        readonly layouts: readonly {
            readonly name: string;
            readonly layout: {
                readonly style?: string | undefined;
                readonly columns: number;
                readonly gap?: number | undefined;
                readonly rows?: number | undefined;
                readonly placements: {
                    readonly [x: string]: {
                        readonly area: readonly [readonly [number, number], readonly [number, number]];
                        readonly v?: "stretch" | "center" | "end" | "start" | undefined;
                        readonly h?: "stretch" | "center" | "end" | "start" | undefined;
                    };
                };
            };
            readonly media?: string | undefined;
        }[];
    };
    kind: typeof KIND;
};
export type BlockValue = Readonly<{
    id: string;
    type: string;
    compatibilityDate: string;
}> & Readonly<Record<string, unknown>>;
export type { LayoutSetValue } from '../../share/layout.js';
export type PageConfigValue = Readonly<{
    kind: typeof KIND;
    title?: LocaleValue;
    style?: string;
    slot: Readonly<{
        blocks: ReadonlyArray<BlockValue>;
        layouts: ReadonlyArray<import('../../share/layout').LayoutSetValue>;
    }>;
}>;
