import{W as y,u as k,ae as b,ak as h,x as O,o as R,ai as f,b4 as M,b5 as v,b6 as B,l as T,_ as x}from"./index.js";import{c as A}from"./copyTextToClipboard-bf4926ca.js";import{aZ as $,a1 as F}from"./antd-fb8ca017.js";import{d as N,u as P,Z as W,_ as j,k as o,a5 as c,a1 as w,a6 as i,G as u,a0 as d}from"./vue-08ef39cb.js";const D=N({name:"SettingFooter",components:{CopyOutlined:$,RedoOutlined:F},setup(){const e=y(),{prefixCls:p}=k("setting-footer"),{t:s}=R(),{createSuccessModal:g,createMessage:n}=T(),m=b(),r=h(),t=O();function a(){A(JSON.stringify(P(t.getProjectConfig),null,2),null),g({title:s("layout.setting.operatingTitle"),content:s("layout.setting.operatingContent")})}function C(){try{t.setProjectConfig(f);const{colorWeak:l,grayMode:S}=f;M(),v(l),B(S),n.success(s("layout.setting.resetSuccess"))}catch(l){n.error(l)}}function _(){localStorage.clear(),t.resetAllState(),e.resetState(),m.resetState(),r.resetState(),location.reload()}return{prefixCls:p,t:s,handleCopy:a,handleResetSetting:C,handleClearAndRedo:_}}});function G(e,p,s,g,n,m){const r=i("CopyOutlined"),t=i("a-button"),a=i("RedoOutlined");return W(),j("div",{class:w(e.prefixCls)},[o(t,{type:"primary",block:"",onClick:e.handleCopy},{default:c(()=>[o(r,{class:"mr-2"}),u(" "+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"}),u(" "+d(e.t("common.resetText")),1)]),_:1},8,["onClick"]),o(t,{color:"error",block:"",onClick:e.handleClearAndRedo},{default:c(()=>[o(a,{class:"mr-2"}),u(" "+d(e.t("layout.setting.clearBtn")),1)]),_:1},8,["onClick"])],2)}const E=x(D,[["render",G],["__scopeId","data-v-40d284fb"]]);export{E as default};
