fcf.module({
  name: "fcfDBControls:templates/management.hooks.js",
  dependencies: [],
  module: function(){
    return {
      //
      // void hookBeforeBuild(a_taskInfo)
      // The hook is executed before assembling the template arguments
      //
      // hookBeforeBuild: function(a_taskInfo) {
      // },

      //
      // void hookAfterBuild(a_taskInfo)
      // The hook is executed after assembling the template arguments
      //
      // hookAfterBuild: function(a_taskInfo) {
      // },

      //
      // void hookAfterBuild(a_taskInfo)
      // The hook is executed after building the template's system arguments
      //
      // hookAfterSystemBuild: function(a_taskInfo) {
      // },

      //
      // Object of hooks for programmatically populated arguments
      //
      hooksProgramableArgument: {
        //
        // @result Returns the value of an argument or a Promise object
        //
        visibleEditButton: (a_taskInfo)=>{
          return fcf.checkAccessObject(fcf.application.getProjections().get(a_taskInfo.args.projection).access, "update");
        },
        visibleNewButton: (a_taskInfo)=>{
          return fcf.checkAccessObject(fcf.application.getProjections().get(a_taskInfo.args.projection).access, "insert");
        },
        visibleDeleteButton: (a_taskInfo)=>{
          return fcf.checkAccessObject(fcf.application.getProjections().get(a_taskInfo.args.projection).access, "delete");
        },
        defautlLanguage: ()=>{
          return fcf.getSystemVariable("fcf:defaultLanguage");
        },
      },

      //
      // Object of the hooks preprocessing of the template arguments
      //
      // hooksBeforeArgument: {
      //   // 
      //   // @result Can return the value of an argument or Promise or undefined
      //   //
      //   "ARG_NAME": function(a_taskInfo) {
      //   }
      // },

      //
      // Object of the hooks postprocessing of the template arguments
      // hooksAfterArgument: {
      //   //
      //   // @result Can return the value of an argument or Promise or undefined
      //   //
      //   "ARG_NAME": function(a_taskInfo) {
      //   }
      // },
    };
  }
});
