"use strict";(self.webpackChunknocode_component=self.webpackChunknocode_component||[]).push([[9832],{99008:function(n,t,e){e.r(t);e(87912),e(97308);var o=e(13939),l=e.n(o),a=e(34716),c=e.n(a),u=e(70696),i=e.n(u),r=e(4884),d=e.n(r),s=e(3464),f=e.n(s),m=e(51400),v=e.n(m),p=e(25028),b=e.n(p),h=e(30112),g=e(72048),k=e(760),C=e.n(k),y=e(65984),w=e.n(y),x=e(13764),E=e(39756),S=e(23832),j=e(20024),B=e(62132);function F(n,t){var e=l()(n);if(c()){var o=c()(n);t&&(o=i()(o).call(o,(function(t){return d()(n,t).enumerable}))),e.push.apply(e,o)}return e}function I(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?F(Object(e),!0).forEach((function(t){(0,h.c)(n,t,e[t])})):f()?v()(n,f()(e)):F(Object(e)).forEach((function(t){b()(n,t,d()(e,t))}))}return n}var M={addNew:0,edit:1,view:2},N=(0,y.memo)((function(n){var t,e,o,l=n.controlMeta,a=(0,y.useContext)(E.m).model,c=a.batchInvoke,u=a.getControlText,i=(a.getFormStatus,l.pageId),r=l.s,d=l.id,s=l.vi,f={margin:C()(t=C()(e=C()(o="".concat((null==r?void 0:r.m.t)||0," ")).call(o,(null==r?void 0:r.m.r)||0," ")).call(e,(null==r?void 0:r.m.b)||0," ")).call(t,(null==r?void 0:r.m.l)||0)},m=(0,y.useState)(!1),v=(0,g.c)(m,2),p=v[0],b=v[1],h=(0,y.useMemo)((function(){var n=a.getConfig(i),t="string"==typeof n.status?M[n.status]:n.status;return(0,S.i2)(s,t)?I({},l):I(I({},l),{},{Status:"4"})}),[i,s,l]),k=(0,y.useCallback)((function(){b(!0),c("click",i,d,void 0,void 0,(function(){b(!1)}))}),[c,i,d,b]),F=(0,B.c)(k),N=(0,j.c)(h),O=N.disabled,T=N.hidden,_=null!=l&&l.followTheme?"primary":"second";return!T&&w().createElement(x.BtnField,{style:f,type:_,loading:p,onClick:F,disabled:O,text:u(l.text)})}));N.displayName="KDButton",t.default=N}}]);