export default PaintObserver;
declare class PaintObserver {
    /**
     * An observer for a paint (fill or stroke), that will be able to trigger notifications when it changes.
     *
     * @param {function} changeCallback - To be called on any change (with no arguments)
     */
    constructor(changeCallback: Function);
    primary: any;
    changeCallback: Function;
    notifyChangeCallback: () => void;
    updateSecondaryListener: (newPaint: string | Color, oldPaint: string | Color, property: Property) => void;
    secondaryPropertyCountsMap: {};
    /**
     * Should be called when our paint (fill/stroke) may have changed.
     * @public (scenery-internal)
     *
     * Should update any listeners (if necessary), and call the callback (if necessary).
     *
     * NOTE: To clean state, set this to null.
     *
     * @param {PaintDef} primary
     */
    public setPrimary(primary: PaintDef): void;
    /**
     * Releases references without sending the notifications.
     * @public
     */
    public clean(): void;
    /**
     * Called when the value of a "primary" Property (contents of one, main or as a Gradient) is potentially changed.
     * @private
     *
     * @param {string|Color} newPaint
     * @param {string|Color} oldPaint
     * @param {Property} property
     */
    private updateSecondary;
    /**
     * Attempt to attach listeners to the paint's primary (the paint itself), or something else that acts like the primary
     * (properties on a gradient).
     * @private
     *
     * TODO: Note that this is called for gradient colors also https://github.com/phetsims/scenery/issues/1581
     *
     * NOTE: If it's a Property, we'll also need to handle the secondary (part inside the Property).
     *
     * @param {PaintDef} paint
     */
    private attachPrimary;
    /**
     * Attempt to detach listeners from the paint's primary (the paint itself).
     * @private
     *
     * TODO: Note that this is called for gradient colors also https://github.com/phetsims/scenery/issues/1581
     *
     * NOTE: If it's a Property or Gradient, we'll also need to handle the secondaries (part(s) inside the Property(ies)).
     *
     * @param {PaintDef} paint
     */
    private detachPrimary;
    /**
     * Attempt to attach listeners to the paint's secondary (part within the Property).
     * @private
     *
     * @param {string|Color} paint
     */
    private attachSecondary;
    /**
     * Calls the change callback, and invalidates the paint itself if it's a gradient.
     * @private
     */
    private notifyChanged;
    /**
     * Adds our secondary listener to the Property (unless there is already one, in which case we record the counts).
     * @private
     *
     * @param {Property.<*>} property
     */
    private secondaryLazyLinkProperty;
    /**
     * Removes our secondary listener from the Property (unless there were more than 1 time we needed to listen to it,
     * in which case we reduce the count).
     * @private
     *
     * @param {Property.<*>} property
     */
    private secondaryUnlinkProperty;
}
import { Color } from '../imports.js';
//# sourceMappingURL=PaintObserver.d.ts.map