///
import { View, Model } from 'backbone';
export declare type Result = T | {
(): T;
};
export declare type Selector = NonNullable;
export declare type NoSelector = false;
export declare type FallbackSelector = Selector | NoSelector;
export declare type JQElement = JQuery;
export declare type SafeInsertionMethod = 'append' | 'prepend';
export declare type RiskyInsertionMethod = 'after' | 'before' | 'replaceWith';
export declare type InsertionMethod = SafeInsertionMethod | RiskyInsertionMethod;
export interface RootSubViewDton {
view: string | Result;
selector?: Result;
method?: Result;
place?: string | Result;
}
export interface SelectorSubViewDton {
view: string | Result;
selector: Result;
method?: Result;
place?: string | Result;
}
export declare type SubViewDescription = RootSubViewDton | SelectorSubViewDton;
export declare type SubView = string | Result;
export interface SubViewIterator {
(view: View, selector: JQElement, method: InsertionMethod): void;
}
export interface IterationOptions {
placeOnly?: boolean;
reverse?: boolean;
}
export declare type _NormalizedSubView = [View, JQElement, InsertionMethod];
interface ContainerMap {
[selector: string]: JQElement;
}
export default class CompositeView extends View {
defaultPlacement: SafeInsertionMethod;
_containers: ContainerMap;
render(): this;
beforeRender(): this;
renderContainer(): this;
afterRender(): this;
remove(): this;
/**
* Invariant: each subview must appear at most once in this list.
*/
subviews(): SubView[];
clearSubviews(): this;
detachSubviews(): this;
placeSubviews(): this;
forEachSubview(iteratee: SubViewIterator, options?: IterationOptions): this;
_resetContainer(): this;
_getSubviews(applyChecks: boolean): _NormalizedSubView[];
_normalizeSubview(applyChecks: boolean, sv: SubView): _NormalizedSubView | void;
_normalizeRootSubview(view: View, method: Result): _NormalizedSubView;
_normalizeSelectorSubview(view: View, selector: Selector, method: Result): _NormalizedSubView;
_resolve(handle: string | Result): T;
}
export declare function _removeSubview(view: V): void;
export declare function _detachSubview(view: V): void;
export declare function _placeSubview(subview: V, container: JQElement, method: InsertionMethod): void;
export {};