index-C-k9K7In.js 850 B

1
  1. import{d as r,f as t,h as i,j as e,i as n,S as h,A as m,k as p,l as u}from"./index-DT8qTvyx.js";const v=()=>{const{t:a}=r(),[s,l]=t.useState(!1),[d,o]=t.useState({}),c={type:"button",label:a("amis_editor.get_php_code"),level:"success",actionType:"ajax",api:{method:"post",url:"/dev_tools/editor_parse",data:{schema:d}},feedback:{title:"PHP Schema",size:"lg",body:{type:"editor",language:"php",name:"schema"}}};return i("div",{className:"h-screen",children:[e(n,{className:"h-full",title:a("amis_editor.editor"),bodyStyle:{padding:0,height:"calc(100% - 55px)"},extra:i(h,{children:[e(m,{schema:c}),e(p,{level:"primary",onClick:()=>l(!s),children:a(s?"amis_editor.edit":"amis_editor.preview")})]}),children:e("div",{className:"w-full h-full overflow-x-auto",children:e(u,{onChange:o,preview:s})})}),e("div",{className:"h-5"})]})};export{v as default};