import { EventEmitter } from "../../stencil.core";
import { PieContent, ItemConfig } from "../../interface";
import { PieLoader, BundleEndpoints } from "../../pie-loader";
import { InsertImageEvent, DeleteImageEvent, InsertSoundEvent, DeleteSoundEvent, ImageHandler } from "@pie-framework/pie-configure-events";
import { ExternalImageSupport } from "./dataurl-image-support";
import { ExternalUploadSoundSupport } from "./dataurl-upload-sound-support";
/**
 * Pie Author will load a Pie Content model for authoring.
 * It needs to be run in the context
 */
export declare class Author {
    _modelLoadedState: boolean;
    doc: Document;
    /**
     * Optionally specifies the back-end that builds and hosts javascript bundles for rendering assessment items.
     * This property lets you choose which environment to use, from 'dev' , 'stage' or 'prod' environments.
     * Until 1.0 will default to 'stage'.
     * Starting v2.0.3, it will temporarily redirect to production only
     */
    bundleHost?: string;
    /**
     * Provide this property override the default endpoints used by the player to retrieve JS
     * bundles. Must be set before setting the config property.
     * Most users will not need to use this property.
     */
    bundleEndpoints?: BundleEndpoints;
    /**
     * Allows disabling of the default behaviour which is to look up and load the JS bundle that define the Custom Elements
     * used by the item config.
     * This if for advanced use cases when using the pie-player in a container that is managing loading of Custom Elements and Controllers.
     */
    disableBundler: boolean;
    /**
     * If set the player will add a rubric authoring interaction to the config
     */
    addRubric: boolean;
    /**
     * Adds a preview view which will render the content in another tab as it may appear to a student or instructor.
     */
    addPreview: boolean;
    el: HTMLElement;
    elementsLoaded: boolean;
    /**
     * The Pie config model.
     */
    config: ItemConfig;
    /**
     * Emmitted when the model for the content has been updated within the ui due to user action.
     */
    modelUpdated: EventEmitter;
    /**
     * Emmitted when the content models in the config have been set on the content
     */
    modelLoaded: EventEmitter;
    /**
     * To customize the standard behaviour provided by interaction configuration views you can
     * provide settings key-ed by the package name.  e.g.
     *
     * `{ '@pie-element/inline-choice': { promptLabel: 'Item Stem' } }`
     *
     * The settings that are configurable for each authoring view are documented in
     * the `@package-name/docs` folder for each package.
     */
    configSettings?: {
        [packageName: string]: Object;
    };
    /**
     * To provide a way to add a default model to complex-rubric
     */
    defaultComplexRubricModel?: Object;
    /**
     * If pie-author is used inside pie-api-author component. Do not set it manually.
     */
    isInsidePieApiAuthor?: boolean;
    pieContentModel: PieContent;
    pieLoader: PieLoader;
    renderMarkup: String;
    fileInput: any;
    imageHandler: ImageHandler;
    handleFileInputChange: (e: Event) => void;
    handleInsertImage: (e: InsertImageEvent) => void;
    handleDeleteImage: (e: DeleteImageEvent) => void;
    handleInsertSound: (e: InsertSoundEvent) => void;
    handleDeleteSound: (e: DeleteSoundEvent) => void;
    handleSetConfigElement: (e: CustomEvent) => void;
    /** external providers can set this if they need to upload the assets to the cloud etc. by default we use data urls */
    imageSupport: ExternalImageSupport;
    /** external providers can set this if they need to upload the assets to the cloud etc. by default we use data urls */
    uploadSoundSupport: ExternalUploadSoundSupport;
    version: string;
    /**
     * used in our demo environment to allow author to watch config settings and make updates
     * defaults to false (do not set it to true because it was not tested properly)
     * @type {boolean}
     * @private
     */
    canWatchConfigSettings: boolean;
    validateModels(): Promise<any>;
    insertImage(file: File): void;
    constructor();
    getRenderMarkup(): string;
    isAdvancedItemConfig: (config: any) => Boolean;
    watchConfig(newValue: any, oldValue: any): Promise<void>;
    getPieContentModelWithToggledComplexRubric: ({ complexRubricCheckedValues, pieContentModel }: {
        complexRubricCheckedValues: any;
        pieContentModel: any;
    }) => Promise<any>;
    getNewConfig: (newConfig: any) => any;
    removeComplexRubricItemTypes(pieContentModel: any, rubricElements: any): Promise<any>;
    addComplexRubric(pieContentModel: any): Promise<PieContent>;
    addConfigTags(c: PieContent): void;
    watchElementsLoaded(newValue: boolean, oldValue: boolean): Promise<void>;
    updateModels(): Promise<void>;
    setModelsAndConfigurations: () => void;
    watchConfigSettings(): void;
    componentDidUnload(): void;
    componentWillLoad(): Promise<void>;
    componentDidLoad(): Promise<void>;
    componentDidUpdate(): Promise<void>;
    loadPieElements(): Promise<void>;
    private renderMath;
    afterRender(): Promise<void>;
    /**
     * Utility method to add a `@pie-element/rubric` section to an item config when creating an item should be used before setting the config.
     *
     * @deprecated this method is for temporary use, will be removed at next major release
     *
     * @param config the item config to mutate
     * @param rubricModel
     */
    addRubricToConfig(config: ItemConfig, rubricModel?: any): Promise<PieContent>;
    /**
     * Utility method to add a `@pie-element/multi-trait-rubric` section to an item config when creating an item should be used before setting the config.
     **
     * @param config the item config to mutate
     * @param multiTraitRubricModel
     */
    addMultiTraitRubricToConfig(config: ItemConfig, multiTraitRubricModel?: any): Promise<PieContent>;
    render(): any;
}
