import { Sizes, TypographyVariants } from '@m4l/styles';
import { CSSProperties, ReactNode } from 'react';
import { PageNodeProps } from './subcomponents/PageNode/types';
import { SectionNodeProps } from './subcomponents/SectionNode/types';
import { HeaderNodeProps } from './subcomponents/HeaderNode/types';
import { BodyNodeProps } from './subcomponents/BodyNode/types';
import { FooterNodeProps } from './subcomponents/FooterNode/types';
import { PaperNodeProps } from './subcomponents/PaperNode/types';
import { PropertyValueNodeProps } from './subcomponents/PropertyValueNode/types';
import { GridNodeProps } from './subcomponents/GridNode/types';
import { ChartNodeProps } from './subcomponents/ChartNode/types';
import { Theme } from '@mui/material';
import { PRINTING_SYSTEM_KEY_COMPONENT } from './constants';
import { PrintingSystemSlots } from './slots/PrintingSystemEnum';
import { M4LOverridesStyleRules } from '../../@types/augmentations';
export interface BaseProviderPrintSystem {
    pageId: number;
    unitSize: string;
    mainColor: string;
    countPages: number;
    HeaderGeneral?: (ancestor: any) => React.JSX.Element;
    FooterGeneral?: (ancestor: any) => React.JSX.Element;
    sourceData: any;
    templateData: RootNode;
}
/**
 * Direction: Propiedad para la dirección de contenidos
 */
type Direction = 'column' | 'row';
/**
 * Align: Propiedades de alineación de contenidos
 */
type Align = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
export interface NodeTypeCollection {
    page: () => ReactNode;
    section: () => ReactNode;
    textBox: () => ReactNode;
    image: () => ReactNode;
    header: () => ReactNode;
    body: () => ReactNode;
    footer: () => ReactNode;
    paper: () => ReactNode;
    propertyValue: () => ReactNode;
    divider: () => ReactNode;
    grid: () => ReactNode;
    chart: () => ReactNode;
}
/**
 * BaseNode: Se encarga de contener las propiedades comunes entre la lista de componentes.
 */
export interface BaseNode {
    key: string;
    className?: string;
    style?: CSSProperties;
    children?: NodePrint[];
}
/**
 * PaddingProperties: propiedades de espaciado interno.
 */
export interface PaddingProperties {
    paddingTop?: number;
    paddingLeft?: number;
    paddingRight?: number;
    paddingBottom?: number;
}
/**
 * PaddingProperties: propiedades de espaciado interno.
 */
export interface SizeProperty {
    width: number | 'auto' | string;
    height: number | 'auto' | string;
}
/**
 * RootNode: Componente que agrupa todas las posibles paginas
 */
export interface RootNode {
    unitSizes: string;
    mainColor: string;
    header: HeaderNode[];
    footer: FooterNode[];
    pages?: PageNode[];
}
/**
 * PageNode: Componente de página, es el primer componente que se carga en las estructuras NodeType y se encarga de definir el formato de tamaño
 */
export interface PageNode extends BaseNode, PaddingProperties, SizeProperty {
    type: 'page';
    gap?: number | string;
    rows?: Array<{
        key: string;
        cols: Array<{
            key: string;
            cells: Array<{
                key: string;
                component: string;
                props: Record<string, any>;
                styles?: CSSProperties;
            }>;
        }>;
    }>;
}
/**
 * SectionNode: Componente para distrubir elementos de NodeType en fila.
 */
export interface SectionNode extends BaseNode, PaddingProperties, SizeProperty {
    type: 'section';
    direction: Direction;
    alignX?: Align;
    alignY?: Align;
    grow?: boolean;
    gap?: number;
}
/**
 * TextBox: Componente para visualizar estructuras de texto.
 */
export interface TextBoxNode extends Omit<BaseNode, 'children'> {
    type: 'textBox';
    variant: TypographyVariants;
    textAlign: 'start' | 'center' | 'end' | 'justify';
    children: string;
}
/**
 * ImageNode: Componente para visualizar imagenes.
 */
export interface ImageNode extends BaseNode {
    type: 'image';
    src: string;
    width?: number;
    height?: number;
}
/**
 * QReNode: Componente para visualizar una imagen qr.
 */
export interface QRImageNode extends BaseNode {
    type: 'qrImage';
    url: string;
    size?: number;
    color?: string;
}
/**
 * HeaderNode: Componente para visualizar la cabecera del documento.
 */
export interface HeaderNode extends Omit<SectionNode, 'type'> {
    type: 'header';
}
/**
 * BodyNode: Componente para visualizar el cuerpo del documento.
 */
export interface BodyNode extends Omit<SectionNode, 'type'> {
    type: 'body';
}
/**
 * FooterNode: Componente para visualizar el pie de página del documento.
 */
export interface FooterNode extends Omit<SectionNode, 'type'> {
    type: 'footer';
}
/**
 * PaperNode: Componente que contiene una lista de campos de valor.
 */
export interface PaperNode extends BaseNode {
    type: 'paper';
    title: string;
    titleSecondary?: string;
}
/**
 * PropertyValue: Componente que organiza un campo con una etiqueta y valor.
 */
export interface PagerNode extends BaseNode {
    type: 'pager';
}
/**
 * PropertyValue: Componente que organiza un campo con una etiqueta y valor.
 */
export interface PropertyValue extends Omit<BaseNode, 'children'> {
    type: 'propertyValue';
    property: string;
    propertyWidth?: number | string;
    children: string | NodePrintPropertyValue[];
    direction: Direction;
}
export type NodePrintPropertyValue = SectionNode | TextBoxNode | ImageNode | FooterNode | PaperNode | DividerNode | GridNode | ChartNode | PagerNode | QRImageNode;
/**
 * DividerNode: Componente que aporta una división gráfica.
 */
export interface DividerNode extends Omit<BaseNode, 'children'> {
    type: 'divider';
    direction: 'vertical' | 'horizontal';
    children?: string;
}
export interface Columns {
    key: string;
    title: string;
    alignX?: Align;
    alignY?: Align;
    nestedValue?: string;
    width?: number | string;
}
/**
 * GridNode: Componente dibuja una tabla de información con n canditad de registros y columnas.
 */
export interface GridNode extends Omit<BaseNode, 'children'> {
    type: 'grid';
    columns: Array<Columns>;
    rows: Array<any> | string;
    children?: string;
}
/**
 * ChartNode: Componente dibuja una grafica de información.
 */
export interface UncertaintyType {
    x: number;
    xMin: 0;
    xMax: 0;
    y: number;
    yMin: number;
    yMax: number;
}
export interface ChartNode extends Omit<BaseNode, 'children'> {
    type: 'chart';
    children?: string;
    points: Array<any> | string;
    messageX: string;
    messageY: string;
}
export type NodePrint = SectionNode | TextBoxNode | ImageNode | HeaderNode | BodyNode | FooterNode | PaperNode | PropertyValue | DividerNode | GridNode | ChartNode | PagerNode | QRImageNode;
export type NodePrintComponent = ((props: PageNodeProps) => React.JSX.Element) | ((props: SectionNodeProps) => React.JSX.Element) | ((props: HeaderNodeProps) => React.JSX.Element) | ((props: BodyNodeProps) => React.JSX.Element) | ((props: FooterNodeProps) => React.JSX.Element) | ((props: PaperNodeProps) => React.JSX.Element) | ((props: PropertyValueNodeProps) => React.JSX.Element) | ((props: GridNodeProps) => React.JSX.Element) | ((props: ChartNodeProps) => React.JSX.Element);
export interface PrintingSystemProps {
    templateData: RootNode;
    sourceData: any;
    className?: string;
    size?: Extract<Sizes, 'small' | 'medium'>;
    variant?: Extract<TypographyVariants, 'bodyStandard' | 'bodyDens' | 'subtitleStandard' | 'subtitleDens' | 'titleStandard' | 'titleDens' | 'h1' | 'h3'>;
    dataTestId?: string;
}
export interface PrintingSystemRef {
    GoPrint: () => void;
}
export type PrintingSystemSlotsType = keyof typeof PrintingSystemSlots;
export type PrintingSystemOwnerState = Pick<PrintingSystemProps, 'size'> & {
    variant?: PrintingSystemProps['variant'];
    size?: PrintingSystemProps['size'];
};
export type PrintingSystemStyles = M4LOverridesStyleRules<PrintingSystemSlotsType, typeof PRINTING_SYSTEM_KEY_COMPONENT, Theme>;
export {};
//# sourceMappingURL=types.d.ts.map