"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8183,689],{689:function(l,o,e){e.r(o),e.d(o,{JSCollectionActionRunJSContext:function(){return t}});var n=e(72004),s=e.n(n),r=e(12444),u=e.n(r),a=e(31996),c=e.n(a),d=e(26037),i=e.n(d),m=e(67946),t=function(b){c()(_,b);var C=i()(_);function _(){return u()(this,_),C.apply(this,arguments)}return s()(_)}(m.Uo);t.define({label:"JSCollectionAction RunJS context",properties:{resource:`Collection resource instance providing access to selected rows, pagination, and data operations.
      Use ctx.resource.selectedRows to get selected records.
      Use ctx.resource.pagination for page info.`}}),t.define({label:"JS \u96C6\u5408\u52A8\u4F5C RunJS \u4E0A\u4E0B\u6587",properties:{resource:"\u5217\u8868\u8D44\u6E90\uFF08\u5305\u542B\u9009\u4E2D\u884C/\u5206\u9875\u4FE1\u606F\u7B49\uFF09"}},{locale:"zh-CN"})},58183:function(l,o,e){e.r(o);var n=e(689),s={contexts:[n.JSCollectionActionRunJSContext],prefix:"sn-act-destroy-selected",label:"Destroy selected rows",description:"Delete selected rows via resource.destroySelectedRows()",locales:{"zh-CN":{label:"\u5220\u9664\u9009\u4E2D\u884C",description:"\u901A\u8FC7 resource.destroySelectedRows() \u5220\u9664\u9009\u4E2D\u884C"}},content:`
const rows = ctx.resource?.getSelectedRows?.() || [];
if (!rows.length) {
  ctx.message.warning(ctx.t('Please select data'));
  return;
}

await ctx.resource.destroySelectedRows();
ctx.message.success(ctx.t('Deleted {{count}} rows', { count: rows.length }));
`};o.default=s}}]);
