/**
 * SharePoint Framework support for building and extending client-side applications.
 *
 * @packagedocumentation
 */

import { BaseComponent } from '@microsoft/sp-component-base';
import { BaseComponentContext } from '@microsoft/sp-component-base';
import { BaseExtension } from '@microsoft/sp-extension-base';
import { ExtensionContext } from '@microsoft/sp-extension-base';
import { Guid } from '@microsoft/sp-core-library';
import { IDisposable } from '@microsoft/sp-core-library';
import { ServiceKey } from '@microsoft/sp-core-library';
import { ServiceScope } from '@microsoft/sp-core-library';
import { SPEvent } from '@microsoft/sp-core-library';
import { SPEventArgs } from '@microsoft/sp-core-library';

/**
 * Provides access to the client-side application that is currently running.
 *
 * @remarks
 * The client-side application determines the user experience for an entire web page.
 * (It is a client-side component with a manifest; however, the SharePoint Framework
 * does not enable third parties to create their own client-side applications at this time.)
 * Within a web page, at most one client-side application will be running at a time.
 * Certain in-place navigation transitions can cause the application to be unloaded
 * and replaced by a different application.
 *
 * The ApplicationAccessor class enables extensibility components such as extensions
 * and web parts to interact with the currently running application.  It acts as
 * a proxy for the real application object (the BaseApplication subclass), to ensure
 * that extensibility components only rely on interactions that would be portable
 * across all applications.
 *
 * @public
 */
export declare class ApplicationAccessor {
    private _navigatedEvent;
    private _privateLayoutChangedEvent;
    /**
     * Constructs a new instance of the {@link ApplicationAccessor} class.
     * @remarks
     * Third parties should not call this constructor.  Instead, use the ApplicationAccessor
     * instance from the component context, for example {@link BaseApplicationCustomizer.context}.
     */
    constructor(serviceScope: ServiceScope);
    /**
     * An event that is fired when the application's top-level page context navigates
     * to a new page.
     * @remarks
     * This event fires after the top-level {@link @microsoft/sp-page-context#PageContext} has navigated
     * to a new page.
     * @eventproperty
     */
    get navigatedEvent(): SPEvent<SPEventArgs>;
    /* Excluded from this release type: _layoutChangedEvent */
}

/**
 * The component context for {@link BaseApplicationCustomizer}.
 *
 * @public
 */
export declare class ApplicationCustomizerContext extends ExtensionContext {
    private _placeholderProvider;
    private _applicationAccessor;
    private _componentTag;
    /* Excluded from this release type: __constructor */
    /**
     * Exposes a collection of content placeholders for use by third parties.
     */
    get placeholderProvider(): PlaceholderProvider;
    /**
     * Provides access to the client-side application that is currently running.
     */
    get application(): ApplicationAccessor;
    /**
     * @override
     */
    dispose(): void;
}

/* Excluded from this release type: _ApplicationLoadType */

/* Excluded from this release type: _ApplicationManager */

/* Excluded from this release type: BaseApplication */

/* Excluded from this release type: BaseApplicationContext */

/**
 * This is the base class that third parties should extend when implementing
 * a client-side extension that runs when an application is first starting.
 *
 * @remarks
 * In the component manifest, the "extensionType" should be set to "ApplicationCustomizer".
 *
 * Example usage scenarios for an application customizer might include: rendering custom
 * UI elements inside a SharePoint content placeholder, tracking page load statistics,
 * or automatically logging the user out after a certain time period.
 *
 * @public
 */
export declare abstract class BaseApplicationCustomizer<TProperties> extends BaseExtension<TProperties> {
    /**
     * {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
     */
    protected readonly context: ApplicationCustomizerContext;
    private _placeholdersChangedCallback?;
    /* Excluded from this release type: _initializeExtensionType */
    /**
     * {@inheritDoc @microsoft/sp-component-base#BaseComponent.dispose}
     */
    dispose(): void;
    /**
     * This event method is called when the placeholders of the host application change, come into
     * existence, or disappear.
     * virtual
     */
    protected onPlaceholdersChanged(placeholderProvider: PlaceholderProvider): void;
}

/* Excluded from this release type: _DialogManagerConfiguration */

/* Excluded from this release type: _IApplicationContextParameters */

/* Excluded from this release type: _IApplicationCustomizerContextParameters */

/* Excluded from this release type: _IComponentContextParameters */

/* Excluded from this release type: _IExtensionContextParameters */

/* Excluded from this release type: _INavigationProperties */

/* Excluded from this release type: _INavigationResult */

/* Excluded from this release type: _IPlaceholderContentParameters */

/**
 * Options for the {@link PlaceholderProvider.tryCreateContent} method.
 *
 * @public
 */
export declare interface IPlaceholderCreateContentOptions {
    /**
     * An optional callback that will be invoked when the PlaceholderContent object
     * is disposed.
     *
     * @remarks
     * To avoid a resource leak, use this callback to free any resources that were allocated
     * when the placeholder content was rendered.  For example, if ReactDOM.render() was
     * used to mount a React component, then the onDispose handler might call
     * ReactDOM.unmountComponentAtNode() to unmount it.
     */
    onDispose?: (placeholderContent: PlaceholderContent) => void;
}

/* Excluded from this release type: _IPlaceholderDefinition */

/* Excluded from this release type: _IPlaceholderEntry */

/* Excluded from this release type: _IPreloadedData */

/* Excluded from this release type: _ISearchData */

/* Excluded from this release type: _ISPPageChrome */

/* Excluded from this release type: ISuiteNavConfigurationData */

/* Excluded from this release type: ISuiteNavManager */

/* Excluded from this release type: ISuiteNavManagerConfiguration */

/* Excluded from this release type: _NavigationDataError */

/* Excluded from this release type: _NavigationErrorCode */

/* Excluded from this release type: _NavigationOperation */

/* Excluded from this release type: _NavigationUnsupportedReason */

/* Excluded from this release type: _Navigator */

/* Excluded from this release type: _OnBeforeNavigationEventName */

/* Excluded from this release type: _Placeholder */

/**
 * Represents custom content that is rendered inside a placeholder on a SharePoint page.
 *
 * @remarks
 * This object is returned by {@link PlaceholderProvider.tryCreateContent}.
 * It provides access to a Document Object Model (DOM) element where the owner can render
 * its custom content.
 *
 * @public
 */
export declare class PlaceholderContent implements IDisposable {
    private static _logSource;
    private _domElement;
    private _placeholder;
    private _disposeHandler;
    private _isDisposed;
    /* Excluded from this release type: __constructor */
    /**
     * Identifies the placeholder that this content was added to.
     *
     * @remarks
     * Example: PlaceholderName.Top
     */
    get name(): PlaceholderName;
    /**
     * The Document Object Model (DOM) element where the owner should render its custom content.
     *
     * @remarks
     * If the caller needs to be notified when the DOM element is disposed, use
     * the {@link IPlaceholderCreateContentOptions.onDispose} callback.
     */
    get domElement(): HTMLDivElement;
    /* Excluded from this release type: _setPlaceholder */
    /* Excluded from this release type: _setOptions */
    /**
     * Disposes the PlaceholderContent object and removes its attached DOM element from the page.
     *
     * @remarks
     * This method can be called to immediately dispose the attached DOM element. Otherwise, it
     * will be disposed by the application when the containing placeholder is disposed. Calling dispose()
     * invokes the {@link IPlaceholderCreateContentOptions.onDispose} callback, removes the associated
     * DOM element from the page, and disposes the PlaceholderContent object.
     */
    dispose(): void;
    get isDisposed(): boolean;
    /**
     * Return true if this PlacholderContent object is visible.  If you create a placeholder
     * and the host page isn't displaying it, this will return false.
     */
    get isVisible(): boolean;
}

/* Excluded from this release type: _PlaceholderManager */

/**
 * The identifier for a content placeholder, which is a region on the
 * page where third-party extensibility components can render custom content.
 *
 * @remarks
 * For more information about placeholders, see {@link PlaceholderProvider}.
 *
 * @public
 */
export declare enum PlaceholderName {
    /**
     * A region at the top of the page.
     * @privateRemarks
     * Used by Modern pages and Lists and libraries
     */
    Top = 1,
    /**
     * A region at the bottom of the page.
     * @privateRemarks
     * Used by Modern pages and Lists and libraries
     */
    Bottom = 2
}

/**
 * Allows third-party components to discover and use SharePoint placeholders.  Placeholders
 * enable third-party components to render custom content into designated regions on the page.
 *
 * @remarks
 * Placeholders are designated regions on the page, identified by one of the predefined
 * {@link PlaceholderName} constants.  Different applications and pages might support different
 * placeholder names.  Placeholders can appear and disappear as the user interacts with the page,
 * for example via in-place navigation.  Third-party components should not assume that a given placeholder
 * will always be available.
 *
 * Use {@link PlaceholderProvider.tryCreateContent} to test whether a placeholder is
 * available and add content to it.   Use the {@link PlaceholderProvider.changedEvent} event
 * to discover when new placeholders appear.
 *
 * @public
 */
export declare class PlaceholderProvider implements IDisposable {
    private static _logSource;
    private _sequence;
    private _placeholderManager;
    private _placeholderContents;
    private _isDisposed;
    private _preAllocatedTopPlaceholderContent;
    private _preAllocatedBottomPlaceholderContent;
    private _componentTag;
    /* Excluded from this release type: __constructor */
    dispose(): void;
    get isDisposed(): boolean;
    /**
     * Tests whether the page contains the specified placeholder.  If so, a new PlaceholderContent
     * object is created, which allows the caller to render custom content inside the placeholder.
     *
     * @param name - The requested placeholder
     * @param options - Additional options, for example to detect when the placeholder is disposed.
     * @returns A new PlaceholderContent object, or undefined if the requested placeholder does not exist.
     *
     * @remarks
     *
     * The host application makes no guarantees about the availability of a given placeholder.
     * In situations where an expected placeholder is not available, the third-party extension
     * must handle it gracefully, e.g. by not rendering anything, or by choosing an alternative
     * placeholder.
     */
    tryCreateContent(name: PlaceholderName, options?: IPlaceholderCreateContentOptions): PlaceholderContent | undefined;
    private _preAllocateContent;
    /**
     * Returns the names of the currently available placeholders.
     */
    get placeholderNames(): ReadonlyArray<PlaceholderName>;
    /**
     * This event is raised when the list of currently available placeholders is changed.
     *
     * @remarks
     * The application can change its list of available placeholders at any time. This means that the existing
     * placeholders may get disposed or new placeholders may be added. Use this event to discover new
     * placeholders when they appear.
     *
     * @eventproperty
     */
    get changedEvent(): SPEvent<SPEventArgs>;
    private _tryCreateContent;
    private _postContentCreation;
}

/* Excluded from this release type: _PrefetchedDataEventArgs */

/* Excluded from this release type: _SearchQueryManager */

/* Excluded from this release type: SPError */

/* Excluded from this release type: _SPPageChromeProvider */

/* Excluded from this release type: _SPThemeProvider */

export { }
