/// <reference types="react" />
/// <reference types="draft-js" />
import * as React$1 from 'react';
import React__default from 'react';
import { DraftComponent } from 'draft-js';

interface AieStyleMap {
    [styleName: string]: {
        css: React.CSSProperties;
        aieExclude: string[];
    };
}

/** Interface for the AsupInternalEditor component */
interface AsupInternalEditorProps {
    value: string;
    setValue?: (ret: string) => void;
    style?: React__default.CSSProperties;
    styleMap?: AieStyleMap;
    textAlignment?: Draft.DraftComponent.Base.DraftTextAlignment | "decimal";
    decimalAlignPercent?: number;
    showStyleButtons?: boolean;
    editable?: boolean;
}
declare const AsupInternalEditor: ({ value, setValue, style, styleMap, textAlignment, showStyleButtons, editable, decimalAlignPercent, }: AsupInternalEditorProps) => JSX.Element;

interface AifBlockLine {
    aifid?: string;
    left?: string | false;
    centre?: string | false;
    right?: string | false;
    addBelow?: boolean;
    canEdit?: boolean;
    canRemove?: boolean;
    canMove?: boolean;
}
declare const enum AifLineType {
    leftOnly = "Left only",
    centreOnly = "Centre only",
    leftAndRight = "Left and Right",
    leftCentreAndRight = "Left, Centre and Right"
}

interface AioDropSelectProps {
    value?: string;
    availableValues?: Array<string>;
    setValue?: (value: string) => void;
}
/**
 * Wrapper to preprend Icon button with chosen text
 */
declare const AioDropSelect: ({ value, setValue, availableValues }: AioDropSelectProps) => JSX.Element;

interface AioExpanderProps {
    inputObject?: {
        [key: string]: any;
    };
    label?: string;
    showBorders?: boolean;
    updateObject?: (value: any) => void;
    canAddItems?: boolean;
    canMoveItems?: boolean;
    canRemoveItems?: boolean;
}
declare const AioExpander: (props: AioExpanderProps) => JSX.Element;

interface AioIconButtonProps {
    onClick?: (ret: string) => void;
    iconName?: string;
    tipText?: string;
    menuItems?: string[];
    leftMenuOffset?: string;
    style?: React__default.CSSProperties;
}
declare const AioIconButton: ({ onClick, iconName, tipText, menuItems, leftMenuOffset, style, }: AioIconButtonProps) => JSX.Element;

/** Individual options */
interface AioOption {
    optionName?: AioNewItem;
    type: AioOptionType;
    value: any;
    label?: string;
    availableValues?: string[];
    readOnly?: boolean;
}
/** Text replacements, and their replacement matrix */
interface AioReplacement {
    airid?: string;
    oldText: string;
    newTexts: AioReplacementValues[];
    includeTrailing?: boolean;
    externalName?: string;
}
interface AioReplacementValues {
    airid?: string;
    texts: string[];
    spaceAfter?: boolean;
    subLists?: AioReplacement[];
}
interface AioExternalReplacements {
    givenName: string;
    newTexts: AioReplacementValues[];
}
interface AioExternalSingle {
    airid?: string;
    oldText?: string;
    newText?: string;
}
declare enum AioOptionType {
    string = "string",
    number = "number",
    array = "array",
    object = "object",
    boolean = "boolean",
    select = "select",
    replacements = "replacements"
}
declare enum AioNewItem {
    newKey = "newKey",
    newType = "newType"
}

interface AioReplacmentDisplayProps {
    airid?: string;
    oldText?: string;
    newTexts: AioReplacementValues[];
    includeTrailing?: boolean;
    externalName?: string;
    setReplacement?: (ret: AioReplacement) => void;
    externalLists?: AioExternalReplacements[];
    dontAskSpace?: boolean;
    dontAskTrail?: boolean;
    noText?: boolean;
}
/**
 * Render an individuial AioReplacement
 * @param props value/setValue pair
 */
declare const AioReplacementDisplay: ({ airid, oldText, newTexts, includeTrailing, externalName, setReplacement, externalLists, dontAskSpace, dontAskTrail, noText: noOldText, }: AioReplacmentDisplayProps) => JSX.Element;

interface AioReplacementValuesDisplayProps {
    airid?: string;
    texts?: string[];
    spaceAfter?: boolean;
    subLists?: AioReplacement[];
    setReplacementValue?: (ret: AioReplacementValues) => void;
    dontAskSpace?: boolean;
    dontAskTrail?: boolean;
    externalLists?: AioExternalReplacements[];
}
declare const AioReplacementValuesDisplay: ({ airid, texts, spaceAfter, subLists, setReplacementValue, dontAskSpace, dontAskTrail, externalLists, }: AioReplacementValuesDisplayProps) => JSX.Element;

interface AioStringProps {
    label?: string;
    value?: string;
    setValue?: (value: string) => void;
}
declare const AioString: (props: AioStringProps) => JSX.Element;

interface AsupInternalBlockProps {
    lines: AifBlockLine[];
    setLines?: (ret: AifBlockLine[]) => void;
    minLines?: number;
    maxLines?: number;
    externalSingles?: AioExternalSingle[];
    styleMap?: AieStyleMap;
    defaultType?: AifLineType;
    style?: React__default.CSSProperties;
}
declare const AsupInternalBlock: ({ lines, setLines, minLines, maxLines, externalSingles, styleMap, defaultType, style, }: AsupInternalBlockProps) => JSX.Element;

interface AitCellData {
    aitid?: string;
    text: string;
    justifyText?: DraftComponent.Base.DraftTextAlignment | "decimal";
    comments?: string;
    colSpan?: number;
    rowSpan?: number;
    colWidth?: number;
    textIndents?: number;
    replacedText?: string;
    repeatColSpan?: number;
    repeatRowSpan?: number;
    spaceAfterRepeat?: boolean;
    spaceAfterSpan?: number;
}
interface AitRowData {
    aitid?: string;
    rowRepeat?: string;
    cells: AitCellData[];
    spaceAfter?: boolean;
}
interface AitRowGroupData {
    aitid?: string;
    name?: string;
    rows: AitRowData[];
    comments?: string;
    spaceAfter?: boolean;
    replacements?: AioReplacement[];
}
interface AitTableData {
    headerData?: AitRowGroupData | false;
    bodyData?: AitRowGroupData[];
    comments?: string;
    rowHeaderColumns?: number;
    noRepeatProcessing?: boolean;
}

interface AsupInternalTableProps {
    tableData: AitTableData;
    setTableData: (ret: AitTableData) => void;
    processedDataRef?: React__default.MutableRefObject<AitTableData | undefined>;
    externalLists?: AioExternalReplacements[];
    externalSingles?: AioExternalSingle[];
    style?: React__default.CSSProperties;
    showCellBorders?: boolean;
    groupTemplates?: AitRowGroupData[] | false;
    commentStyles?: AieStyleMap;
    cellStyles?: AieStyleMap;
}
/**
 * Table view for clinical table data
 * @param props
 * @returns
 */
declare const AsupInternalTable: ({ tableData, setTableData, processedDataRef, externalLists, externalSingles, style, showCellBorders, groupTemplates, commentStyles, cellStyles, }: AsupInternalTableProps) => JSX.Element;

interface AsupInternalWindowProps {
    Title: string;
    Visible: boolean;
    onClose: () => void;
    style?: React$1.CSSProperties;
    children?: React$1.ReactChild | React$1.ReactChild[];
}
declare const AsupInternalWindow: (props: AsupInternalWindowProps) => JSX.Element;

declare const newExternalReplacements: () => AioExternalReplacements;

declare const newExternalSingle: () => AioExternalSingle;

declare const newReplacementValues: () => AioReplacementValues;

/**
 * Add newRowGroupTemplate to existing body
 * @param l - Length of row
 * @param newRowGroupTemplate
 * @returns New row group
 */
declare const newRowGroup: (l?: number, newRowGroupTemplate?: AitRowGroupData) => AitRowGroupData;

interface oldReplacementText {
    text: string;
    spaceAfter: boolean;
}
interface oldReplacementValue {
    newText: string;
    subList?: oldReplacementValue[];
}
interface oldReplacement {
    airid?: string;
    replacementTexts: oldReplacementText[];
    replacementValues: oldReplacementValue[];
    givenName?: string;
    externalName?: string;
}
declare function updateReplacementVersion(reps?: AioReplacement[] | oldReplacement[]): AioReplacement[];
declare function updateReplToExtl(reps: AioExternalReplacements[] | oldReplacement[] | {
    name: string;
    list: oldReplacement[];
}[]): AioExternalReplacements[];

interface OldTableData {
    headerData?: OldRowGroupData;
    bodyData?: OldRowGroupData[];
    comments?: string;
    rowHeaderColumns?: number;
    noRepeatProcessing?: boolean;
}
interface OldRowGroupData {
    aitid?: string;
    name?: string;
    rows: AitRowData[];
    comments?: string;
    spaceAfter?: boolean;
    replacements?: AioReplacement[] | oldReplacement[];
}
declare const updateTableDataVersion: (inData: OldTableData | AitTableData) => AitTableData;

export { AieStyleMap, AifBlockLine, AifLineType, AioDropSelect, AioExpander, AioExternalReplacements, AioExternalSingle, AioIconButton, AioOption, AioReplacement, AioReplacementDisplay, AioReplacementValues, AioReplacementValuesDisplay, AioString, AitCellData, AitRowData, AitRowGroupData, AitTableData, AsupInternalBlock, AsupInternalEditor, AsupInternalTable, AsupInternalWindow, newExternalReplacements, newExternalSingle, newReplacementValues, newRowGroup, updateReplToExtl, updateReplacementVersion, updateTableDataVersion };
