import{aP as b,a as k,bo as h,b as v,bF as R,l as O,by as M,aQ as c,o as x,h as T,j as o,p as i,q as d,t as u,n as A,c as B,fl as F,k as m,bU as C,fC as P,fD as $,x as j}from"./index.0d073eaa.js";import{C as D}from"./CopyOutlined.02d1bfa6.js";import{R as N}from"./RedoOutlined.32117fb5.js";const w=k({name:"SettingFooter",components:{CopyOutlined:D,RedoOutlined:N},setup(){const e=h(),{prefixCls:p}=v("setting-footer"),{t:s}=B(),{createSuccessModal:f,createMessage:r}=j(),g=R(),l=O(),t=M();function a(){const{isSuccessRef:n}=F(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;P(n),$(_),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 I(e,p,s,f,r,g){const l=c("CopyOutlined"),t=c("a-button"),a=c("RedoOutlined");return x(),T("div",{class:A(e.prefixCls)},[o(t,{type:"primary",block:"",onClick:e.handleCopy},{default:i(()=>[o(l,{class:"mr-2"}),d(" "+u(e.t("layout.setting.copyBtn")),1)]),_:1},8,["onClick"]),o(t,{color:"warning",block:"",onClick:e.handleResetSetting,class:"my-3"},{default:i(()=>[o(a,{class:"mr-2"}),d(" "+u(e.t("common.resetText")),1)]),_:1},8,["onClick"]),o(t,{color:"error",block:"",onClick:e.handleClearAndRedo},{default:i(()=>[o(a,{class:"mr-2"}),d(" "+u(e.t("layout.setting.clearBtn")),1)]),_:1},8,["onClick"])],2)}var q=b(w,[["render",I],["__scopeId","data-v-2d4de409"]]);export{q as default};
