import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import * as React from 'react';
import { createForm } from "../../../utils";
import _preview from "../emptyBlock/preview.png";
import { createColumnsFormTpl } from "../util";
var defaultData = [[{
  type: 'input',
  data: {
    formSettings: {
      name: 'cutoverName',
      label: '割接名称',
      defaultValue: ''
    }
  }
}], [{
  type: 'select',
  data: {
    formSettings: {
      name: 'major',
      label: '专业',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "计算机",
        value: "computer"
      }, {
        label: "设计",
        value: "design"
      }]
    }
  }
}, {
  type: 'select',
  data: {
    formSettings: {
      name: 'isConflictWithGroupCutover',
      label: '是否与集团割接冲突',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "是",
        value: "Y"
      }, {
        label: "否",
        value: "N"
      }]
    }
  }
}], [{
  type: 'select',
  data: {
    formSettings: {
      name: 'isChangedResourceSystem',
      label: '是否资源系统变更',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "是",
        value: "Y"
      }, {
        label: "否",
        value: "N"
      }]
    }
  }
}, {
  type: 'select',
  data: {
    formSettings: {
      name: 'isAffectBusiness',
      label: '是否影响业务',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "是",
        value: "Y"
      }, {
        label: "否",
        value: "N"
      }]
    }
  }
}], [{
  type: 'select',
  data: {
    formSettings: {
      name: 'cutoverSort',
      label: '割接分类',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "A",
        value: "A"
      }, {
        label: "B",
        value: "B"
      }]
    }
  }
}], [{
  type: 'select',
  data: {
    formSettings: {
      name: 'cutoverReasonSort',
      label: '割接原因分类',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "生成原因",
        value: "A"
      }, {
        label: "效益原因",
        value: "B"
      }]
    }
  }
}], [{
  type: 'select',
  data: {
    formSettings: {
      name: 'cutoverType',
      label: '割接类型',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "A",
        value: "A"
      }, {
        label: "B",
        value: "B"
      }]
    }
  }
}, {
  type: 'select',
  data: {
    formSettings: {
      name: 'debugMode',
      label: '调试方式',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "A",
        value: "A"
      }, {
        label: "B",
        value: "B"
      }]
    }
  }
}], [{
  type: 'select',
  data: {
    formSettings: {
      name: 'interruptType',
      label: '中断类型',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "A",
        value: "A"
      }, {
        label: "B",
        value: "B"
      }]
    }
  }
}, {
  type: 'select',
  data: {
    formSettings: {
      name: 'configChangeList',
      label: '配置变更清单',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "A",
        value: "A"
      }, {
        label: "B",
        value: "B"
      }]
    }
  }
}], [{
  type: 'datePicker',
  data: {
    formSettings: {
      name: 'cutoverStartTime',
      label: '割接开始时间',
      defaultValue: '2020-11-22'
    }
  }
}, {
  type: 'datePicker',
  data: {
    formSettings: {
      name: 'cutoverEndTime',
      label: '割接结束时间',
      defaultValue: '2020-11-25'
    }
  }
}], [{
  type: 'select',
  data: {
    formSettings: {
      name: 'inTransitCutoverList',
      label: '在途割接单',
      defaultValue: ''
    },
    formItemSettings: {
      options: [{
        label: "A",
        value: "A"
      }, {
        label: "B",
        value: "B"
      }]
    }
  }
}], [{
  type: 'textArea',
  data: {
    formSettings: {
      name: 'cutoverReason',
      label: '割接原因',
      defaultValue: ''
    }
  }
}], [{
  type: 'buttons',
  group: [{
    type: 'button',
    data: {
      formItemSettings: {
        type: 'primary',
        htmlType: 'submit',
        text: '保存'
      },
      settings: {}
    }
  }, {
    type: 'button',
    data: {
      formItemSettings: {
        htmlType: 'button',
        type: null,
        text: '取消'
      }
    }
  }]
}]];
export default {
  name: 'pb-editor-block-form-columns',
  type: 'pb-editor-block',
  category: 'general',
  title: 'Form block',
  create: function create() {
    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    var form = createForm(_objectSpread(_objectSpread({}, options), {}, {
      elements: []
    }));
    form = createColumnsFormTpl(defaultData, form);
    return form;
  },
  image: {
    meta: {
      width: 500,
      height: 73,
      aspectRatio: 500 / 73
    }
  },
  preview: function preview() {
    return /*#__PURE__*/React.createElement("img", {
      src: _preview,
      alt: 'Form block'
    });
  }
};
//# sourceMappingURL=index.js.map