'use strict';

import { JV } from '../jpc_value_define';
import { JpcCommonOutputHelper } from './jpc_helper_common_output';
import { JpcAreaHelper } from './jpc_helper_area';
import { IBandDetail, Fields } from '../../interface/basic';

let JpcTextHelper = {
    //暂定
    outputText: function (textNode: any, band: IBandDetail, unitFactor: number, rows: number, rowIdx: number, cols: number, colIdx: number, multiCols: number, multiColIdx: number) {
        let rst = JpcCommonOutputHelper.createCommonOutput(textNode, textNode.Label, null);
        //position
        rst.area = JpcAreaHelper.outputArea(textNode.area, band, unitFactor, rows, rowIdx, cols, colIdx, multiCols, multiColIdx, false, false);
        return rst;
    },
    outputDirectValue: function (textNode: Fields, value: string, band: IBandDetail, unitFactor: number, rows: number, rowIdx: number, cols: number, colIdx: number, multiCols: number, multiColIdx: number) {
        let rst = JpcCommonOutputHelper.createCommonOutput(textNode, value, null);
        //position
        rst.area = JpcAreaHelper.outputArea(textNode.area, band, unitFactor, rows, rowIdx, cols, colIdx, multiCols, multiColIdx, false, false);
        return rst;
    }
};

export default JpcTextHelper;