import { type TemplateResult, nothing } from 'lit';
import type { Activity } from './Activity.js';
import type { Fragment } from './Fragment.js';
export declare enum FragmentState {
    Initialized = 0,
    Created = 1,
    Attached = 2,// Added to an Activity or Fragment
    Started = 3,// Visible
    Resumed = 4,// Has focus
    Paused = 5,
    Stopped = 6,// No longer visible
    Detached = 7,// Removed from an Activity or Fragment
    Destroyed = 8
}
export interface FragmentOptions {
    parent?: Activity | Fragment;
}
/**
 * `FragmentManager` is the class responsible for performing actions
 * on the app's fragments, such as adding, removing, or replacing them
 * and adding them to the back stack.
 */
export declare class FragmentManager {
    /**
     * Stores fragments by I
     */
    private fragments;
    /**
     * The reference to the host activity or fragment.
     */
    private host;
    constructor(host: Activity | Fragment);
    onDestroy(): Promise<void>;
    /**
     * Attaches a fragment to a parent Activity or Fragment
     *
     * @param fragment The fragment to add.
     * @param parent The parent fragment or activity.
     * @param renderTarget Optional DOM target to render to.
     * @param data Optional data to pass to the `onCreate()` method.
     */
    attachFragment(key: string, fragment: Fragment, parent: Activity | Fragment, data?: unknown): Promise<void>;
    /**
     * Detaches a fragment from its parent.
     * @param fragment
     * @returns
     */
    detachFragment(key: string): Promise<void>;
    /**
     * Shows a Fragment (calls lifecycle methods and renders)
     * @param fragment The fragment to render.
     * @param renderTarget Optional render target, if any.
     */
    showFragment(key: string, renderTarget?: HTMLElement): Promise<void>;
    /**
     * Sets styles for a fragment by adding a class to the root element.
     * This is useful for applying specific styles to fragments.
     *
     * The root element is either fragment's render root or the document element.
     * @param fragment The fragment to set styles for.
     */
    setFragmentStyles(fragment: Fragment): void;
    /**
     * Removes styles for a fragment by removing a class from the root element.
     * This is useful for cleaning up styles when a fragment is no longer visible.
     *
     * The root element is either fragment's render root or the document element.
     * @param fragment The fragment to remove styles for.
     */
    removeFragmentStyles(fragment: Fragment): void;
    /**
     * Lists all visible fragments, that is in the fragments with the `FragmentState.Resumed` state.
     * @returns The list of visible fragments
     */
    getVisible(): Fragment[];
    /**
     * Hides a Fragment (calls lifecycle methods and removes from DOM if necessary)
     */
    hideFragment(fragment: Fragment): Promise<void>;
    findFragment(key: string): Fragment | undefined;
    renderFragment(key: string): TemplateResult | typeof nothing;
    updateActiveFragments(): void;
    /**
     * Finds a fragment by activity request code.
     * @param requestCode The request code to find the fragment by.
     * @returns The corresponding fragment or `null`.
     */
    findByRequestCode(requestCode: number): Fragment | null;
}
//# sourceMappingURL=FragmentManager.d.ts.map