import getTablePostData from "../../../../../utils/getTablePostData";
export default (function (_ref) {
  var intlPrefix = _ref.intlPrefix,
      formatMessage = _ref.formatMessage,
      projectId = _ref.projectId;
  return {
    autoQuery: true,
    selection: false,
    transport: {
      read: function read(_ref2) {
        var data = _ref2.data;
        var postData = getTablePostData(data);
        return {
          url: "/devops/v1/projects/".concat(projectId, "/page_projects"),
          method: 'post',
          data: postData
        };
      }
    },
    fields: [{
      name: 'name',
      type: 'string',
      label: formatMessage({
        id: "".concat(intlPrefix, ".project.name")
      })
    }, {
      name: 'code',
      type: 'string',
      label: formatMessage({
        id: "".concat(intlPrefix, ".project.code")
      })
    }],
    queryFields: [{
      name: 'name',
      type: 'string',
      label: formatMessage({
        id: "".concat(intlPrefix, ".project.name")
      })
    }, {
      name: 'code',
      type: 'string',
      label: formatMessage({
        id: "".concat(intlPrefix, ".project.code")
      })
    }]
  };
});