import getTablePostData from "../../../../../utils/getTablePostData";
export default (function (intlPrefix, formatMessage, projectId, DetailDs) {
  return {
    autoCreate: false,
    autoQuery: false,
    selection: false,
    paging: true,
    transport: {
      read: function read(_ref) {
        var data = _ref.data;
        var postData = getTablePostData(data);
        return {
          url: "/devops/v1/projects/".concat(projectId, "/pvs/").concat(DetailDs.current.get('id'), "/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")
      })
    }]
  };
});