import { ServicesAccessor } from '../../../../../../../util/vs/platform/instantiation/common/instantiation';
import { CodeSnippet, DiagnosticBag, SupportedContextItem, SupportedContextItemType, Trait } from '../../../../types/src';
import { ResolvedContextItem } from '../contextProviderRegistry';
/**
 *
 * Internal types and validation functions for context items
 */
/**
 * Construct the final types, which may include required properties that the base types do not have.
 */
export type TraitWithId = Trait & {
    id: string;
    type: 'Trait';
};
export type CodeSnippetWithId = CodeSnippet & {
    id: string;
    type: 'CodeSnippet';
};
export type DiagnosticBagWithId = DiagnosticBag & {
    id: string;
    type: 'DiagnosticBag';
};
export type SupportedContextItemWithId = TraitWithId | CodeSnippetWithId | DiagnosticBagWithId;
export declare function filterContextItemsByType<S extends SupportedContextItemType>(resolvedContextItems: ResolvedContextItem[], type: S): ResolvedContextItem<Extract<SupportedContextItemWithId, {
    type: S;
}>>[];
type SupportedContextItemWithType = SupportedContextItem & {
    type: SupportedContextItemType;
};
export declare function filterSupportedContextItems(contextItems: SupportedContextItem[]): [SupportedContextItemWithType[], number];
/**
 * Assigns a random ID if it wasn't assigned by the context provider.
 * Invalid or duplicate IDs are replaced with valid ones and logged to avoid dropping the context
 * and worsen the user experience.
 */
export declare function addOrValidateContextItemsIDs(accessor: ServicesAccessor, contextItems: SupportedContextItemWithType[]): SupportedContextItemWithId[];
export {};
//# sourceMappingURL=contextItemSchemas.d.ts.map