///
import * as React from 'react';
/**
* A panel item context is metadata passed to a panel item to give some
* context as to where in the container it is being rendered.
*/
export interface PanelItemContext {
index: number;
}
export declare type PanelFragment = React.ReactNode;
/**
* panel item prop can be statically assigned or dynamically determined
* based on a provided item context
*/
export declare type PanelItemProp = TValue | ((context: TContext) => TValue);
/**
* panel items can be wrapped in a different component
* this allows composing new items with an existing panel
*/
export declare type PanelItemTemplate = (fragment: PanelFragment, context: TContext) => PanelFragment;
/**
* panel item props allow component to inject props to the rendered
* block structure.
*/
export interface PanelItemProps {
/**
* apply custom class name to the corresponding panel item
*/
itemClassName?: PanelItemProp;
/**
* apply custom style to the corresponding panel item
*/
itemStyle?: PanelItemProp;
/**
* apply custom props to the corresponding panel item
*/
itemProps?: PanelItemProp;
}
export interface PanelTemplateProps {
/**
* apply a custom template to the renderd panel item
*/
itemTemplate?: PanelItemTemplate;
}
export interface PanelRenderProps {
compact?: boolean;
/**
* apply a custom content to an empty panel with no items to render
*/
emptyContent?: PanelFragment;
}
export interface PanelProps extends PanelItemProps, PanelTemplateProps, PanelRenderProps {
fill?: boolean;
}
export declare abstract class Panel extends React.Component {
static displayName: string;
static defaultComponentClass: string;
static getPanelItemPropValue(prop: (PanelItemProp) | undefined, context: TContext): TValue | undefined;
protected renderPanel(panelClassName?: string, panelProps?: PanelProps, componentClass?: React.ReactType): JSX.Element;
protected renderItems(children?: React.ReactNode, componentClass?: React.ReactType): React.ReactNode[];
protected renderEmpty(): false | JSX.Element;
protected renderItem(itemTemplate: PanelFragment, index: number, componentClass?: React.ReactType): PanelFragment;
protected renderItemFragment(itemTemplate: PanelFragment, context: PanelItemContext, Component: React.ReactType): PanelFragment;
protected getItemKey(itemTemplate: PanelFragment, index: number): any;
}