///
import { Theme } from '@mui/material';
import { LegendPositions, LegendSize } from '../../model';
import { LegendProps } from '../../Legend';
type Dimensions = {
width: number;
height: number;
};
export interface ContentWithLegendProps {
/**
* Width of the overall component layout in pixels.
*/
width: number;
/**
* Height of overall component layout in pixels.
*/
height: number;
/**
* Child content to render next to the legend. May be a react node or a
* function that returns a react node. The function provides the expected
* height and width for the content, which can be useful for passing down
* to chart components.
*/
children: React.ReactNode | (({ width, height }: Dimensions) => React.ReactNode);
/**
* Size used for the legend.
*
* @default 'medium'
*/
legendSize?: LegendSize;
/**
* Props to configure the legend. If not set, the content is rendered without
* a legend.
*/
legendProps?: Omit;
/**
* Space to put between the children and the legend in pixels.
*/
spacing?: number;
/**
* Minimum width required for the content specified by the `children` prop.
* If this width cannot be maintained with a right positioned legend, the
* legend will not be shown.
*/
minChildrenWidth?: number;
/**
* Minimum height required for the content specified by the `children` prop.
* If this width cannot be maintained with a bottom positioned legend, the
* legend will not be shown.
*/
minChildrenHeight?: number;
}
export interface ContentWithLegendLayoutOpts extends Required> {
legendProps?: ContentWithLegendProps['legendProps'];
theme: Theme;
}
export interface ContentWithLegendLayout {
legend: Dimensions & {
show: boolean;
};
content: Dimensions;
margin: {
right: number;
bottom: number;
};
}
type LegendSizeConfig = Record>;
export declare const TABLE_LEGEND_SIZE: LegendSizeConfig;
/**
* Returns information for laying out content alongside a legend.
*/
export declare function getContentWithLegendLayout({ width, height, legendProps, legendSize, minChildrenHeight, minChildrenWidth, spacing, theme, }: ContentWithLegendLayoutOpts): ContentWithLegendLayout;
export {};
//# sourceMappingURL=content-with-legend-model.d.ts.map