import { ContextImplementor, DataType, EditorFunction, TextEnum } from '@wix/app-extensions/trusted'; export declare enum ProviderType { Context = "Context", ErcInlineContext = "ErcInlineContext", FunctionLibrary = "FunctionLibrary", Template = "Template" } export type Provider = { displayName: string; items?: Record; isAttachable: boolean; isConfigurable: boolean; isDetachable: boolean; providerIdentifier: string; appDefinitionId?: string; } & ({ attachState?: AttachState.Above | AttachState.None | AttachState.Self; contextDependencies?: string[]; displayGroups?: ProviderDisplayGroup[]; providerType: ProviderType.Context; } | { attachState?: AttachState.Above | AttachState.Self; displayGroups?: ProviderDisplayGroup[]; providerType: ProviderType.ErcInlineContext; } | { attachState?: AttachState.Above | AttachState.Self; providerType: ProviderType.Template; } | { attachState?: AttachState.System; providerType: ProviderType.FunctionLibrary; }); export type ProviderDisplayGroup = { displayGroupKey: string; displayName?: string; /** Ordered item names within this group. Ordering between groups is not guaranteed. */ itemNames: string[]; }; type ProviderItemBase = { contextImplementor?: ContextImplementor; displayName: string; itemName: string; }; export type ProviderArrayItem = ProviderItemBase & { arrayItem: ProviderItem; dataType: DataType.arrayItems; }; export type ProviderObjectItem = ProviderItemBase & { dataType: DataType.data; displayGroups?: ProviderDisplayGroup[]; objectItem: Record; }; export type ProviderFunctionItem = ProviderItemBase & { dataType: DataType.function; function?: EditorFunction; }; export type ProviderTextEnumItem = ProviderItemBase & { dataType: DataType.textEnum; textEnum: TextEnum; }; export type ProviderSimpleItem = ProviderItemBase & { dataType: Exclude; }; export type ProviderItem = ProviderArrayItem | ProviderFunctionItem | ProviderObjectItem | ProviderSimpleItem | ProviderTextEnumItem; export declare enum AttachState { Above = "above", None = "none", Self = "self", System = "system" } export type AttachStateFilter = boolean | { filterAttachedState?: AttachState[]; }; export type ListProvidersOptions = { includeAttachState?: AttachStateFilter; includeDependencies?: boolean; includeItems?: boolean; providerIdentifiers?: string[]; providerTypes?: ProviderType[]; }; export {};