import { PanelType } from '../../../../domain/active/active-types';
import { FIELD_TYPE } from '../../../../domain/field/field-type';
import { CreateType } from '../../../../domain/model/model-type';
/**
 * 页面组件值类型
 */
export declare enum PaperWidgetValueType {
    Fixed = "fixed",
    Field = "field",
    Formula = "formula"
}
export declare enum PaperWidgetType {
    Image = "image",
    Barcode = "barcode",
    Qrcode = "qrcode",
    Diagonal = "diagonal",
    Serialnumber = "serialnumber"
}
export interface IBindField {
    /** 字段key */
    field?: string;
    /** 字段类型 */
    fieldType?: FIELD_TYPE;
    /** 字段所属模型 */
    model?: string;
    /** 模型链路 */
    modelLink?: string;
    /** 字段链路 */
    fieldLink?: string;
    /** 是否是关联模型字段 */
    isFieldModel?: boolean;
    /** 子表模型key */
    subModelKey?: string;
    /** 子表字段key */
    subFieldKey?: string;
    /** 字段来源 */
    createType?: CreateType;
    /** 引用的模型key */
    refModelKey?: string;
}
export declare enum BwipCodeType {
    Code39 = "code39",
    Code128 = "code128",
    QRCode = "qrcode",
    GS1DataMatrix = "gs1datamatrix"
}
export declare const BwipCodeTypeOptions: Array<{
    code: BwipCodeType;
    title: string;
    widget: PaperWidgetType;
    example: string;
}>;
/** 分栏的方向 */
export declare enum DiagonalDirection {
    /** 从左上到右下 \  */
    Forward = "forward",
    /** 从右上到左下 / */
    Backward = "backward"
}
/**
 * 图片组件高宽呈现模式
 */
export declare enum WidgetImageSizeMode {
    /**
     * 自适应，响应式的适应外层容器的大小
     */
    RESPONSIVE = "responsive",
    /**
     * 固定值，高宽设了多少就是多少
     */
    FIXED = "fixed"
}
export declare namespace PaperWidget {
    interface BasicSchema {
        /** 组件id */
        id: string;
        icon: string;
        /** 组件类型 */
        type: PaperWidgetType;
        name: string;
        /** 组件值 */
        value?: string;
        layout: {
            width?: number;
            height?: number;
            top?: number;
            left?: number;
        };
        resizable: boolean;
        sort: number;
        dragToPos: PanelType[];
    }
    interface Image extends BasicSchema {
        type: PaperWidgetType.Image;
        sizeMode: WidgetImageSizeMode;
    }
    interface Barcode extends BasicSchema {
        type: PaperWidgetType.Barcode;
        valueType: PaperWidgetValueType;
        fieldType?: string;
        modelKey?: string;
        modelLink?: string;
        fieldLink?: string;
        isFieldModel?: boolean;
        subModelKey?: string;
        subFieldKey?: string;
        createType?: CreateType;
        refModelKey?: string;
        codeType: BwipCodeType.Code39 | BwipCodeType.Code128;
        showValue: boolean;
        styles?: {
            justifyContent: string;
        };
    }
    interface Qrcode extends BasicSchema {
        type: PaperWidgetType.Qrcode;
        valueType: PaperWidgetValueType;
        fieldType?: string;
        modelKey?: string;
        modelLink?: string;
        fieldLink?: string;
        isFieldModel?: boolean;
        subModelKey?: string;
        subFieldKey?: string;
        createType?: CreateType;
        refModelKey?: string;
        codeType: BwipCodeType.QRCode | BwipCodeType.GS1DataMatrix;
    }
    interface Diagonal extends BasicSchema {
        type: PaperWidgetType.Diagonal;
        size: 2 | 3;
        names: [string, string, string];
        /** 是否启用绑定字段 */
        enableFields?: [boolean, boolean, boolean];
        /** 绑定的字段 */
        bindFields?: [IBindField | undefined, IBindField | undefined, IBindField | undefined];
        /** 分栏方向 */
        direction: DiagonalDirection;
    }
    interface Serialnumber extends BasicSchema {
        type: PaperWidgetType.Serialnumber;
        /** 初始数值 */
        initialValue: number;
        /** 自增跨度 */
        autoAddValue: number;
    }
}
