import * as Schema from 'effect/Schema';
type SchemaBuilderReturn = Schema.Schema.AnyNoContext | Schema.PropertySignature<any, any, any, any, any, any, any>;
type SchemaBuilder = (propertyId: any) => SchemaBuilderReturn;
type RelationPropertiesDefinition = Record<string, SchemaBuilder>;
type RelationOptionsBase = {
    backlink?: boolean;
};
type RelationOptions<RP extends RelationPropertiesDefinition> = RelationOptionsBase & {
    properties: RP;
};
export declare const relationSchemaBrand: "__hypergraphRelationSchema";
type RelationSchemaMarker = {
    readonly [relationSchemaBrand]: true;
};
export declare const relationBuilderBrand: "__hypergraphRelationBuilder";
type RelationBuilderMarker = {
    readonly [relationBuilderBrand]: true;
};
type RelationMappingInput<RP extends RelationPropertiesDefinition | undefined> = RP extends RelationPropertiesDefinition ? {
    propertyId: string;
    properties: {
        [K in keyof RP]: Parameters<RP[K]>[0];
    };
} : string | {
    propertyId: string;
};
type RelationPropertyValue<RP extends RelationPropertiesDefinition | undefined> = RP extends RelationPropertiesDefinition ? {
    readonly [K in keyof RP]: Schema.Schema.Type<ReturnType<RP[K]>>;
} : Record<string, never>;
type RelationPropertyEncoded<RP extends RelationPropertiesDefinition | undefined> = RP extends RelationPropertiesDefinition ? {
    readonly [K in keyof RP]: Schema.Schema.Encoded<ReturnType<RP[K]>>;
} : Record<string, never>;
type RelationMetadata<RP extends RelationPropertiesDefinition | undefined> = {
    readonly id: string;
} & RelationPropertyValue<RP>;
type RelationMetadataEncoded<RP extends RelationPropertiesDefinition | undefined> = {
    readonly id: string;
} & RelationPropertyEncoded<RP>;
type RelationSchema<S extends Schema.Schema.AnyNoContext, RP extends RelationPropertiesDefinition | undefined = undefined> = Schema.Schema<readonly (Schema.Schema.Type<S> & {
    readonly id: string;
    readonly _relation: RelationMetadata<RP>;
})[], readonly (Schema.Schema.Encoded<S> & {
    readonly id: string;
    readonly _relation: RelationMetadataEncoded<RP>;
})[], never> & RelationSchemaMarker;
type RelationSchemaBuilder<S extends Schema.Schema.AnyNoContext, RP extends RelationPropertiesDefinition | undefined = undefined> = ((mapping: RelationMappingInput<RP>) => RelationSchema<S, RP>) & RelationBuilderMarker;
export type AnyRelationSchema = (Schema.Schema<any, any, any> & RelationSchemaMarker) | (Schema.PropertySignature<any, any, any, any, any, any, any> & RelationSchemaMarker);
export type AnyRelationBuilder = RelationSchemaBuilder<Schema.Schema.AnyNoContext, RelationPropertiesDefinition | undefined>;
/**
 * Creates a String schema with the specified GRC-20 property ID
 */
export declare const String: (propertyId: string) => Schema.SchemaClass<string, string, never>;
/**
 * Creates a Number schema with the specified GRC-20 property ID
 */
export declare const Number: (propertyId: string) => Schema.SchemaClass<number, number, never>;
/**
 * Creates a Boolean schema with the specified GRC-20 property ID
 */
export declare const Boolean: (propertyId: string) => Schema.SchemaClass<boolean, boolean, never>;
/**
 * Creates a Date schema with the specified GRC-20 property ID
 */
export declare const Date: (propertyId: string) => Schema.refine<Date, typeof Schema.DateFromString>;
export declare const Point: (propertyId: string) => Schema.transform<typeof Schema.String, Schema.Array$<typeof Schema.Number>>;
export declare function Relation<S extends Schema.Schema.AnyNoContext>(schema: S, options?: RelationOptionsBase): RelationSchemaBuilder<S, undefined>;
export declare function Relation<S extends Schema.Schema.AnyNoContext, RP extends RelationPropertiesDefinition>(schema: S, options: RelationOptions<RP>): RelationSchemaBuilder<S, RP>;
export declare function Backlink<S extends Schema.Schema.AnyNoContext, RP extends RelationPropertiesDefinition | undefined = undefined>(schema: S, options?: RP extends RelationPropertiesDefinition ? RelationOptions<RP> : RelationOptionsBase): RelationSchemaBuilder<S, undefined>;
export declare const optional: <S extends Schema.Schema.AnyNoContext>(schemaFn: (propertyId: string) => S) => (propertyId: string) => Schema.optional<S> & RelationSchemaMarker;
export {};
//# sourceMappingURL=type.d.ts.map