import { PieItemElement, PieContent } from "./interface";
export declare const DEFAULT_ENDPOINTS: {
    prod: {
        bundleBase: string;
        buildServiceBase: string;
    };
    stage: {
        bundleBase: string;
        buildServiceBase: string;
    };
    dev: {
        bundleBase: string;
        buildServiceBase: string;
    };
};
export interface Entry {
    package: string;
    status: Status;
    tagName: string;
    controller?: any;
    config?: Element;
    element?: Element;
}
interface LoadedElementsQuery {
    name: string;
    tag: string;
}
interface LoadedElementsResp {
    elements: LoadedElementsQuery[];
    val: boolean;
}
export interface BundleEndpoints {
    buildServiceBase: string;
    bundleBase: string;
}
export declare enum Status {
    loading = "loading",
    loaded = "loaded"
}
export declare enum BundleType {
    player = "player.js",
    clientPlayer = "client-player.js",
    editor = "editor.js"
}
export declare const needToLoad: (registry: any, bundle: BundleType) => (el: string, key: string) => boolean;
/**
 * Pie Registry contols the loading of all PIEs from the pie build service
 */
export declare class PieLoader {
    endpoints: BundleEndpoints;
    /**
     * Create a PieLoader instance
     * Can provide config object for endpoints, will default to to production environment preset.
     * @param endpoints an object providing {bundleBase, buildServiceBase} endpoints
     */
    constructor(_endpoints?: BundleEndpoints);
    private static _registry;
    protected registry: {
        [elementName: string]: Entry;
    };
    getController: (pieTagName: string) => any;
    elementsHaveLoaded: (els: LoadedElementsQuery[]) => Promise<LoadedElementsResp>;
    /**
     *
     * @param {Object<string,string>} elements elements to load from pie cloud service
     * @param {HTMLDocument} doc - the document to load the scripts
     * @param {string} base_url - default base url for cloud service
     */
    loadCloudPies: (options: {
        content: PieContent;
        doc: Document;
        endpoints?: BundleEndpoints;
        bundle?: BundleType;
        useCdn: boolean;
    }) => Promise<void>;
    /**
     * Given a defintion of elements, will check the registry
     * and return the elements and tags that need to be loaded.
     *
     * @param elements - the elements to test against registry
     */
    protected getElementsToLoad: (els: PieItemElement, bundle: BundleType, registry: any) => PieItemElement;
}
export {};
