import type { Schemas } from '../features/Operation/types/schemas';
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
import { type InjectionKey, type ComputedRef } from 'vue';
/** Discriminator context type */
export type DiscriminatorContext = {
    selectedType: string | undefined;
    discriminatorMapping: Record<string, string>;
    discriminatorPropertyName: string;
    hasDiscriminator: boolean;
    mergedSchema: OpenAPIV3_1.SchemaObject | undefined;
};
/** Example context type */
export type ExampleContext = {
    generateExampleValue: (isArray?: boolean) => any;
};
/** Injection keys */
export declare const DISCRIMINATOR_CONTEXT: InjectionKey<ComputedRef<DiscriminatorContext | null>>;
export declare const EXAMPLE_CONTEXT: InjectionKey<ExampleContext>;
/** Discriminator mapping */
export type DiscriminatorMapping = NonNullable<OpenAPIV3_1.DiscriminatorObject['mapping']>;
/** Discriminator property name */
export type DiscriminatorPropertyName = OpenAPIV3_1.DiscriminatorObject['propertyName'];
/** Use discriminator options */
export type UseDiscriminatorOptions = {
    schema: OpenAPIV3_1.SchemaObject | undefined;
    schemas?: Schemas;
    onSchemaChange?: (newSchema: OpenAPIV3_1.SchemaObject) => void;
};
/** Get discriminator mapping from schema */
export declare function getDiscriminatorMapping(schema: OpenAPIV3_1.SchemaObject | undefined): DiscriminatorMapping | undefined;
/** Get discriminator property name from schema */
export declare function getDiscriminatorPropertyName(schema: OpenAPIV3_1.SchemaObject | undefined): DiscriminatorPropertyName | undefined;
/** Check if schema has a discriminator */
export declare function hasDiscriminator(schema: OpenAPIV3_1.SchemaObject | undefined): boolean;
/** Get base discriminator schema name by matching discriminator property */
export declare function getBaseDiscriminatorSchemaName(discriminatorPropertyName: string, schemas?: Schemas): string | null;
/** Get base discriminator schema name for array items that might reference a discriminator schema */
export declare function getDiscriminatorSchemaName(itemsSchema: OpenAPIV3_1.SchemaObject | undefined, schemas?: Schemas): string | null;
/** Merge discriminator schemas */
export declare function mergeDiscriminatorSchemas(baseSchema: OpenAPIV3_1.SchemaObject, selectedType: string, schemas: Record<string, OpenAPIV3_1.SchemaObject>): OpenAPIV3_1.SchemaObject | undefined;
/** Use discriminator hook */
export declare function useDiscriminator({ schema, schemas, onSchemaChange }: UseDiscriminatorOptions): {
    selectedType: import("vue").Ref<string, string>;
    discriminatorMapping: ComputedRef<{
        [value: string]: string;
    } | undefined>;
    defaultType: ComputedRef<string>;
    discriminatorPropertyName: ComputedRef<string | undefined>;
    hasDiscriminator: ComputedRef<boolean>;
    mergedSchema: ComputedRef<OpenAPIV3_1.SchemaObject | undefined>;
    generateExampleValue: (isArray?: boolean) => any;
};
//# sourceMappingURL=useDiscriminator.d.ts.map