import{aH as k,a as b,dp as h,b as v,dE as R,l as O,dx as x,o as M,h as T,j as o,p as c,q as i,t as d,n as A,c as B,fg as P,k as m,dP as C,f1 as $,f2 as j,aJ as u,x as F}from"./index.bde7963b.js";import{C as N}from"./CopyOutlined.999c8c8e.js";import{R as w}from"./RedoOutlined.4aa527e6.js";const D=b({name:"SettingFooter",components:{CopyOutlined:N,RedoOutlined:w},setup(){const e=h(),{prefixCls:p}=v("setting-footer"),{t:s}=B(),{createSuccessModal:f,createMessage:r}=F(),g=R(),l=O(),t=x();function a(){const{isSuccessRef:n}=P(JSON.stringify(m(t.getProjectConfig),null,2));m(n)&&f({title:s("layout.setting.operatingTitle"),content:s("layout.setting.operatingContent")})}function y(){try{t.setProjectConfig(C);const{colorWeak:n,grayMode:_}=C;$(n),j(_),r.success(s("layout.setting.resetSuccess"))}catch(n){r.error(n)}}function S(){localStorage.clear(),t.resetAllState(),e.resetState(),g.resetState(),l.resetState(),location.reload()}return{prefixCls:p,t:s,handleCopy:a,handleResetSetting:y,handleClearAndRedo:S}}});function E(e,p,s,f,r,g){const l=u("CopyOutlined"),t=u("a-button"),a=u("RedoOutlined");return M(),T("div",{class:A(e.prefixCls)},[o(t,{type:"primary",block:"",onClick:e.handleCopy},{default:c(()=>[o(l,{class:"mr-2"}),i(" "+d(e.t("layout.setting.copyBtn")),1)]),_:1},8,["onClick"]),o(t,{color:"warning",block:"",onClick:e.handleResetSetting,class:"my-3"},{default:c(()=>[o(a,{class:"mr-2"}),i(" "+d(e.t("common.resetText")),1)]),_:1},8,["onClick"]),o(t,{color:"error",block:"",onClick:e.handleClearAndRedo},{default:c(()=>[o(a,{class:"mr-2"}),i(" "+d(e.t("layout.setting.clearBtn")),1)]),_:1},8,["onClick"])],2)}var W=k(D,[["render",E],["__scopeId","data-v-2d4de409"]]);export{W as default};
