import{c as e}from"./index-Vg6pPh4v.js";import{_ as t}from"./index-BmXS4TDc.js";import{k as a,o as s,b as n,a0 as o,a3 as l,f as r,E as i,a1 as c,d,a8 as p,B as m,ae as f,F as v}from"./vendor-C4fU48ba.js";import{M as u}from"./antd-31u6eFi9.js";import"./index-BV-v-R7R.js";import"./utils-uTUGmQQn.js";import"./listData-TIEYrgwO.js";const b={class:"canvasBox"},h={class:"canvas-wrapper"},g=d({components:{canvasIndex:t({__name:"index",setup(t){const d=a(null),p=()=>{d.value.exportImage({isContainBg:!0,isContainFixed:!1}).then(e=>{!function(e,t){const a=e.match(/^data:(.+?);base64,/);if(!a)return;const s=a[1],n=s.split("/")[1]||"png",o=atob(e.split(",")[1]),l=new ArrayBuffer(o.length),r=new Uint8Array(l);for(let p=0;p<o.length;p++)r[p]=o.charCodeAt(p);const i=new Blob([l],{type:s}),c=URL.createObjectURL(i),d=document.createElement("a");d.href=c,d.download=`${t}.${n}`,document.body.appendChild(d),d.click(),setTimeout(()=>{document.body.removeChild(d),URL.revokeObjectURL(c)},100)}(e,"canvas")})};return s(()=>{}),n(()=>{}),(t,a)=>(c(),o("div",b,[l("div",h,[r(e,{ref_key:"canvasEditor",ref:d,enabledRedGreenMode:!1},null,512)]),l("div",{class:"btn"},[a[0]||(a[0]=i("123 ")),l("div",{class:"gallery_btn",onClick:p},"Export")])]))}},[["__scopeId","data-v-97ac2e35"]])},setup(){let e=a(!0);return{testModal:e,init:()=>{e.value=!0},cancelDsign:()=>{e.value=!1}}}}),x={ref:"modalTest"},w={class:"generalModel_btn"};const _=d({name:"test",components:{tesst:t(g,[["render",function(e,t,a,s,n,i){const d=f("canvasIndex"),b=u;return c(),o(v,null,[l("div",x,null,512),r(b,{class:"modal_test generalModel",visible:e.testModal,"onUpdate:visible":t[1]||(t[1]=t=>e.testModal=t),footer:null,"get-container":()=>e.$refs.modalTest,width:"78%",maskClosable:!1,centered:!0,closable:!1,wrapClassName:"#app",keyboard:!1},{default:p(()=>[l("div",w,[l("div",{class:"generalModel_closeIcon",onClick:t[0]||(t[0]=m(t=>e.cancelDsign(),["stop"]))},t[2]||(t[2]=[l("svg",{width:"100%",height:"100%",viewBox:"0 0 46 46",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("circle",{cx:"23",cy:"23",r:"23",fill:"#000","fill-opacity":"0.3"}),l("rect",{x:"32.5063",y:"12",width:"3",height:"29",rx:"1.5",transform:"rotate(45 32.5063 12)",fill:"white"}),l("rect",{x:"34.6274",y:"32.5059",width:"3",height:"29",rx:"1.5",transform:"rotate(135 34.6274 32.5059)",fill:"white"})],-1)]))]),r(d)]),_:1},8,["visible","get-container"])],64)}],["__scopeId","data-v-fc747e2f"]])}}),y={class:"box"};const j=t(_,[["render",function(e,t,a,s,n,l){const i=f("tesst");return c(),o("div",y,[r(i)])}],["__scopeId","data-v-db79cbc8"]]);export{j as default};
