import { ComponentFeaturePolicy, ComponentFeaturePolicyConfig, Feature, FeatureListType } from '../types/features.types'; export { type ComponentFeaturePolicy, Feature } from '../types/features.types'; export declare const FeaturePolicyContext: { __context__: ComponentFeaturePolicy | undefined; }; /** * Component feature policy handler. */ export declare class ComponentFeatures implements ComponentFeaturePolicy { #private; /** * Creates a feature policy. All features are initially enabled unless `defaultFeatures` is specified. * * @constructor * @param componentFeatures - Available features. */ constructor(componentFeaturesConfig: ComponentFeaturePolicyConfig, allowedFeatures?: FeatureListType); features(): FeatureListType; supportedFeature(...features: Feature[]): boolean; allowedFeatures(): FeatureListType; allowsFeature(...features: Feature[]): boolean; allowsAnyFeature(...features: Feature[]): boolean; /** * Sets the allowed features. * @param allowedFeatures - Space separated string with features that will be enabled. Empty string will disable all features. `null` or `undefined` will enable all features. */ setAllowedFeatures(allowedFeatures?: string | null): FeatureListType; immutableCopy(): ComponentFeatures; } /** * Creates a list of allowed features based on the featureList as default. * * @param features * @param availableFeatureList - An array of allowed features. * @param defaultFeatureList - An array of default features. * @returns An array of allowed features */ export declare function featureListFromString(features: string, availableFeatureList: FeatureListType, defaultFeatureList: FeatureListType): FeatureListType; export declare function featureConfigFromList(featureList: FeatureListType, defaultFeatures?: FeatureListType): { [k: string]: boolean; }; /** A list of all available features */ export declare const allFeatures: Feature[]; //# sourceMappingURL=features-context.d.ts.map